I am using the latest Windows Intel TBB 2018 Update 2, and am struggling getting the TBB allocators to release memory.
My application has a peak usage of say 25GB.
When using the tbb::allocator the "working set" will peak to 25GB and stay there as , even when all objects are deallocated.
When using the std::allocator the memory will also peak to 25GB but will drop back down to the expected level of 2GB when all objects are deallocated.
I realize that the TBB memory is caching and does not release memory back to the OS, and that is why it outperforms std::allocator
However, I am explicitly calling , at a specific point in my code when memory should be recovered,
but this seems to have no effect despite returning 0. Maybe I am missing something here but it seems that there really should be a way to force TBB to return all deallocated memory to the OS reliably.