
AMDG B Hart wrote:
nope, continued upwards and release_memory() always returns false.
I stepped though #include <boost/pool/pool_alloc.hpp> #include <set> int main() { { std::set<int, std::less<int>, boost::pool_allocator<int> > s; for(int i = 0; i < 100; ++i) { s.insert(i); } } boost::singleton_pool<boost::pool_allocator_tag, 20>::release_memory(); } and the call to release memory does seem to work.
Also, I would say that release_memory is broken, or needing revision, if one has to guess what the pool size is.
It isn't broken. release_memory works fine if you can find the right pool. Because std::set does not expose the type that it actually allocates there is no portable way to do so. In Christ, Steven Watanabe