• Advertisement
Sign in to follow this  

fast memory manager

This topic is 1635 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

hello

 

i want a fast memory allocation library or alogritm  that supports multithreading ( before it i try some library like as ned malloc and doug lea). are u know any other library or alogrithm ?

Share this post


Link to post
Share on other sites
Advertisement

A general purpose allocator will usually be slower than something written specifically for the problem you have, because you can use knowledge of the allocation pattern to speed it up.

 

For example if you can avoid allocating memory one one thread, and freeing it on another you can save on a bunch of expensive synchronization by giving each thread it's own heap.

Share this post


Link to post
Share on other sites

Intel TBB, http://threadingbuildingblocks.org/, has some potentially useful building blocks: http://threadingbuildingblocks.org/docs/doxygen/a00426.html

 

For example, take a look at the "Multi-threaded memory allocators" section in the "Optimizing Game Architectures" article:

http://software.intel.com/en-us/articles/optimizing-game-architectures-with-intel-threading-building-blocks

Edited by Matt-D

Share this post


Link to post
Share on other sites

hello

 

i want a fast memory allocation library or alogritm  that supports multithreading ( before it i try some library like as ned malloc and doug lea). are u know any other library or alogrithm ?

 

Is memory allocation actually causing a bottleneck in your code, or do you just want to drop in a different memory allocator for the sake of having one?

If memory allocation actually is causing performance problems you should first have a look at how you are allocating and freeing memory throughout your code.

 

Are you doing a lot of (small) allocations which get freed right afterwards?

Could you maybe remove some free store allocations in favor of stack allocations?

Is there a possibility of allocating a bunch of memory up front an re-using this pool of memory throughout your application?

 

Always try to look for solutions to your problems higher up before you try to mess with these lower level mechanics, you might be causing more problems than you're solving.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement