[pool] swap function

Hi, I'm using boost::pool for unordered malloc/free and find myself wanting two additional features: * A nothrow swap function (c.f. scoped_ptr) to swap two pools with equal chunk size. This is a bit of a show-stopper for me at the moment, as I don't want to add the extra level of indirection from allocating the pool object itself on the heap. Has anyone already implemented this for boost::pool, or know if it is on the roadmap for a future release? * A function to reset the pool, but without actually deallocating the memory blocks. This would be the same functionality as purge_memory, but without deallocation. Perhaps "purge_chunks" is a reasonable name for this feature? This isn't a show-stopper, but I want to reset everything and allocate a similar numbe of objects, and having good cache coherency for the allocations would be a benefit. Again, before I delve into the internals, has anyone already had a go at this? Many thanks, Simon
participants (1)
-
Simon Brown