Subject: Re: [boost] [pool] doubling algorithm
From: Boris (boriss_at_[hidden])
Date: 2008-10-22 15:08:35
On Wed, 22 Oct 2008 20:50:42 +0200, Chris Newbold
> [...]My thinking is only half-baked, but it seemed natural to me to
> implement this via template-based policies. The two alternatives that
> came to mind were to either (1) integrate support for controlling growth
> into the existing UserAllocator concept; or (2) add an additional
> template parameter to boost::pool to allow the growth strategy to be
> configured independently of the UserAllocator.
> Solution (1) would result in the following additional required semantics
> for a UserAllocator implementation:
> Solution (2) introduces a new concept, GrowthStrategy, as an additional
> template argument for boost::pool (and the other related pool types):
> I'd be interested in hearing your thoughts and ideas...
I'm fine with both solutions. :) As the UserAllocator concept exists
already it might be easier though to simply add a next_size() member
function there? As the concept is rather small and as it's very easy to
define your own user-defined allocator I think it's also fine to add
another member function. So far I would be glad if I could change the
doubling algorithm at all - the extra flexibility with a GrowthStrategy
concept is something I don't need at least.
In case you change UserAllocator (or add the GrowthStrategy concept) soon
and need a tester just tell me! I'll have to modify pool.hpp now anyway as
I urgently need to get rid of the doubling algorithm.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk