
Is there a way to purge the memory of the underlying singleton_pool
used by a specific fast_pool_allocator? For example:
typedef boost::fast_pool_allocator
<
std::pair
my_allocator; typedef std::map
MyMap;
// ...do lots of allocations // I don't care about destructors being called, just release ALL memory if (boost::singleton_pool < boost::fast_pool_allocator_tag, sizeof(my_allocator::value_type), my_allocator::user_allocator, my_allocator::mutex, my_allocator::next_size >::purge_memory() == false) { std::cout << "Failed to purge the fast_pool!!" << std::endl; } This always prints the error message for me. I suspect it has something to do with map's allocator rebinding to allocate map nodes, but I'm not sure how to solve this. Any help would be appreciated.