- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As can be seen in Tutorial.pdf about TBB, the TBBmemory allocator is designed for parallel programming including scalable_allocator and cache_aligned_allocator. I use TBB memory allocator by the automatic replacement method (set LD_PRELOAD environment variable). What surprises me is that it speedup my serial program by 80%. BTW, my serial program consumes about 2.6G memory.
So can anyone tell me what does TBB memory allocator do to allocat memory so effeciently, compared with the STL memory allocator? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As can be seen in Tutorial.pdf about TBB, the TBBmemory allocator is designed for parallel programming including scalable_allocator and cache_aligned_allocator. I use TBB memory allocator by the automatic replacement method (set LD_PRELOAD environment variable). What surprises me is that it speedup my serial program by 80%. BTW, my serial program consumes about 2.6G memory.
So can anyone tell me what does TBB memory allocator do to allocat memory so effeciently, compared with the STL memory allocator? Thanks.
Most likely, such a significant speedup for the serial program is not only due to faster allocation but also better cache utilization. The allocator does its best to re-allocate recently freed space with the same or "close enough" allocation size.For some applications, especially allocating lots of similar-sized small objects, it can make significant difference; but this can not be guaranteed.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As can be seen in Tutorial.pdf about TBB, the TBBmemory allocator is designed for parallel programming including scalable_allocator and cache_aligned_allocator. I use TBB memory allocator by the automatic replacement method (set LD_PRELOAD environment variable). What surprises me is that it speedup my serial program by 80%. BTW, my serial program consumes about 2.6G memory.
So can anyone tell me what does TBB memory allocator do to allocat memory so effeciently, compared with the STL memory allocator? Thanks.
Most likely, such a significant speedup for the serial program is not only due to faster allocation but also better cache utilization. The allocator does its best to re-allocate recently freed space with the same or "close enough" allocation size.For some applications, especially allocating lots of similar-sized small objects, it can make significant difference; but this can not be guaranteed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As can be seen in Tutorial.pdf about TBB, the TBBmemory allocator is designed for parallel programming including scalable_allocator and cache_aligned_allocator. I use TBB memory allocator by the automatic replacement method (set LD_PRELOAD environment variable). What surprises me is that it speedup my serial program by 80%. BTW, my serial program consumes about 2.6G memory.
So can anyone tell me what does TBB memory allocator do to allocat memory so effeciently, compared with the STL memory allocator? Thanks.
Most likely, such a significant speedup for the serial program is not only due to faster allocation but also better cache utilization. The allocator does its best to re-allocate recently freed space with the same or "close enough" allocation size.For some applications, especially allocating lots of similar-sized small objects, it can make significant difference; but this can not be guaranteed.
Got it. Thank you very much.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page