"new" operator not allocating enough memory?

Angelo Fraietta afraiett at bigpond.net.au
Sun Feb 22 18:56:41 UTC 2004


I wasn't able to get the code to compile. However, I can suggest the 
following.

1) Perform a clean and build.

2)  Overload operators new and delete for the  FL_Box and place a printf 
statement inside the new function to see how much memory is beiong 
allocated.

eg
class FL_EXPORT Fl_Box : public Fl_Widget {
    public:
       static void *operator new (size_t size)
        {
             printf ("Allocating %d bytes\r\n", size);
             return malloc(size);
       }

Good luck

-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


http://www.users.bigpond.com/angelo_f/

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)






More information about the users mailing list