
AMDG Soeren Meyer-Eppler wrote:
I have written a small test program to measure the performance benefit of using a boost::fast_pool_allocator vs the default system allocator in conjunction with a std::multi_map. Memory overhead is ~16% lower and the boost allocator is ~4x faster - sweet. However, I can't release the allocated memory via the singleton_pool interface as described in the documentation.
In my test program quoted below the call to purge_memory always returns 0 and according to window's task manager the memory has not been released. An even simpler test just using an allocator for ints and allocating/relasing/purging 10.000.000 ints works as expected. What am I doing wrong?
std::multi_map doesn't allocate object of the value_type. It uses Allocator::rebind to allocate objects of its internal node type, which contains extra member. In Christ, Steven Watanabe