Subject: Re: [boost] Proposal: Monotonic Containers - Comparison with boost::pool, boost::fast_pool and TBB
From: Christian Schladetsch (christian.schladetsch_at_[hidden])
Date: 2009-06-22 02:07:12
> Christian Schladetsch wrote:
>> I also want to again raise the issue of boost::pool_allocator and
>> boost::fast_pool_allocator leaking. [snip]
> Steven> I don't consider this an issue. All allocators with global state
> going to have this problem. monotonic has a different form of the
> same problem.
I do not think this is accurate.
> While in your test cases, it is safe to release the
> memory, in general, if you're using global storage it is not safe to
> release all the memory, because some other code might still be
> using it.
But surely that should be left as a responsibility of the client code? At
least monotonic doesn't leak by default. You can control the memory usage.
With boost::pool_allocator or boost::fast_pool_allocator the user has no
fair chance of avoiding a leak if either allocator was rebound. Even so, the
user of these must explicitly release each differently-sized pool which must
be problematic in general, surely?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk