Sign in to follow this  

Memory Manager Source? (c/c++)

This topic is 4359 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anybody know of any freely available memory manager source code/libraries with pool support? I would like to use the allocator within a particular memory pool that I would create. I've downloaded Doug Lea's malloc.c (which I could modify), but was wondering if there were any better alternatives. With malloc and new you're not able to specify the memory range an allocation would come from, which would be required for pool support. I could roll my own allocator but I don't think I have the knowledge/experience to write an efficient one. High Level Example: Pool menuPool = new Pool(2*1024); //create a 2K pool for the menus Button* myButton = new( menuPool, sizeof(Button) ); //allocate a button in the menu pool Like I said, I could get this behavior if I used my own allocation scheme, but I'd rather use an existing system.

Share this post


Link to post
Share on other sites
I looked at Boost::Pool on Friday, but it didn't meet all my requirements then. My requirements have since changed so it might work (but I just didn't clue in).

It must be Monday. I'll have another look. Thanks.

Share this post


Link to post
Share on other sites

This topic is 4359 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this