Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

About tbb memory_pool & memory_pool_allocator


Dear experts


I am now considering our use of TBB's memory pool utilities (memory_pool and/or memory_pool_allocator etc).

Relating to it, I have some questions.


(1) About preview usage (TBB_PREVIEW_MEMORY_POOL)

I know the utilities are now under preview srage.

Is it safe or reliable to use them?

(Why is it kept the preview? And, is there the future plan to introduce it as a standard?)


(2) memory_pool_allocator for STL containers

I understand the main usage of memory pool is (1) allocate a lump of memory region previously (2) after that, allocate/deallocate each variable in fast way in the definite region. And, those of TBB are orientend to thread-safe usage, isn't it?

Correspondingly, I think this is useful for fast memory allocation/deallocation of STL containers such as std::vector and so on.

I am tackling the problems of high overhead for it, particularly for deallocation (call of destructor) of std::vector, std::unordered_map (and tbb::concurrent_vector, and tbb::concurrent_unordered_map).

Is it suited to make deallocation faster by using TBB's memory pool utilities?


Thank you for your cooperation.


Kind regards




0 Kudos
1 Reply

Dear @Nishikawa__Mitsuru,

I apologize for the long time without response.

Is your request still actual or not?

If yes, do you use tbbmalloc and why?

Thanks, Mariya

0 Kudos