Boost logo

Boost :

Subject: Re: [boost] [pool] Definition of a static_pool ?
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-04-25 06:15:43


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of DUPUIS
> Etienne
> Sent: Tuesday, April 24, 2012 11:36 AM
> To: boost_at_[hidden]
> Subject: [boost] [pool] Definition of a static_pool ?
>
> The Boost.Pool class describes a pool of buffer, pool whose size grows as needed.
>
> This is very convenient but there usage cases where the pool should not perform any dynamic memory
> allocation, i.e. the maximum number of simultaneously required buffers is known at initialization.
I have
> hence defined a simple class 'static_pool' (see below), which
> (i) allocate all requested buffers at initialization;
> (ii) fails (returns null) if more buffers are being asked for at runtime.
>
> Does such a class has its place within the Boost Pool library ?

I'm sure that there is some user for this (though unclear how popular or advantageous it would be -
perhaps others can comment on this?).

To add to Boost.Pool would need merging with the existing framework, providing tests, examples and
updated documentation.

If you are willing to contemplate undertaking this, you could start by setting up a trial project in
your Boost-sandbox folder which starts with a copy of the existing trunk version, and see if you can
get started doing this.

If it look promising (and you are not daunted by the task ;-) you could ask for write access to
boost-sandbox and expose it to public view and see if Boosters like it.

HTH

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk