[Ace-users] ACE allocator

GrahamJWalsh at gmail.com GrahamJWalsh at gmail.com
Mon Aug 27 06:49:25 CDT 2007


I'm just about to embark on plugging a memory pool into our
application. I;d like to put a quick email to this formidable group
before I start. In summary, ALL our C++ objects inherit from a base
class "Object" , a la java. I am hoping to plugin a memory pool such
that everytime a new Object is done (its never going to be called
directly but by derived class ctors), the memory pool kicks in and
returns the appopriate pointer from its memory pool.

To this effect I had planned on putting code in an overridden version
of "Objects" new operator. the body of the new operator will liase
with the Allocator/pool.

Is this approach valid? I can't change the (millions of lines of) code
where new Blah() is called. I have to leave existing code alone.

So, without sounding like a fool, I 'd like to know if this approach
is viable or am I barking up the wrong tree :)

thanks much and have a nice day


More information about the Ace-users mailing list