fast memory manager

Started by
4 comments, last by Radikalizm 10 years, 8 months ago

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 ?

Advertisement

http://goog-perftools.sourceforge.net/doc/tcmalloc.html

The only reason why I still not used it is that in my applications I really don't need complex allocations and I tend to use a simple custom pool allocator. Otherwise I think TCmalloc is what you need

Peace and love, now I understand really what it means! Guardian Angels exist! Thanks!

I use http://www.gii.upv.es/tlsf/ TLSF personally

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.

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

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.

I gets all your texture budgets!

This topic is closed to new replies.

Advertisement