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

Intel tbb scalable allocator is not releasing the memory even after deallocation

SATI__RAJAT
Beginner
807 Views

 


I am working on an application which uses Intel tbb (tbb30_20100406) scalable allocator to allocate and deallocate memory. Every 0.5 second it creates and deletes hundreds of objects. 

The memory taken by the application is increasing infinitely over time. Memory allocation and De-allocation is done in the different threads. I've checked the application for memory leaks, as the application runs forever there are few things which never gets deleted, so only those things are there in valgrind and Intel inspector log. While reading through some online documentation I found out that there was a problem with tbb versions prior to 4.0 that it does not return memory directly to the os, it keeps memory in a pool. 

https://software.intel.com/en-us/forums/intel-threading-building-blocks/topic/706026 ;

https://stackoverflow.com/questions/10360491/does-tbb-scalable-allocator-emphasize-memory-fragmentation ;

Is it the same problem in my case. And is there a way to restrict this. Any Help would be appreciated. 

 

0 Kudos
1 Reply
Vladimir_P_1234567890
807 Views

Hello,

there is an answer in the second link (on stackoverflow). Does not it work for you?

--Vladimir

0 Kudos
Reply