Boost logo

Boost :

From: scleary_at_[hidden]
Date: 2000-11-20 17:20:26


> I propose to create another medium-level interface that replaces the
> RequestedSize template parameter with a constructor argument. My
preferred
> naming would be to call the proposed version sized_pool and the existing
> version static_sized_pool.
>
> The implementations of sized_pool and static_sized_pool would be similar,
> except that sized_pool would require a member variable to hold the size.

I started thinking about it, and Lo And Behold, I think this is the way to
go. The file I just uploaded removes both template arguments and makes them
constructor arguments instead. I also re-wrote pool and pool allocators to
use this, and dropped the "static_sized_pool". My reasons are summarized:

  Any additional memory overhead caused by the additional memory variable
would in most cases be insignificant next to the reduction of template code
bloat.

The pool allocators still have both template arguments because their pools
are statically constructed before main(). This should not be a big code
bloat problem.

        -Steve


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