Boost logo

Boost :

From: Michael Andersen Nexø (nexo_at_[hidden])
Date: 2001-03-02 17:54:11


Since some of you were kind enough to ask for it, I've uploaded the generic
suballocator class that I described in some length a couple of days ago.

Apart from the class not being in the boost namespace, I think the code is
pretty much as "boostified" as it gets. I've succesfully compiled it with
Metrowerks CodeWarrior 6, but I believe the code is entirely ANSI C++, so
any decent C++ compiler should do (e.g. Comeau, KAI, g++, ICL, C++ Builder).
If you find something in the code that is not ANSI C++, please let me know!

Below is a short summary taken from the accompanying readme-file. The header
file itself contains instructions of how to use the suballocator template.

Enjoy!
Michael Andersen Nexø

Summary:
--------
suballocator.hpp defines a suballocator that functions as an intermediate
layer between an inefficiently implemented allocator and a Standard C++
Library container:

    template <class Allocator, size_t PoolSize> class suballocator;

        Allocator: The allocator class to suballocate
        PoolSize: The minimum number of bytes to allocate at a time.

The interface of the suballocator itself conforms to the requirements of the
Standard Library Containers, provided that the underlying allocator does so.

Purpose:
--------
A typical "real world" situation is to only have some kind of low-level
memory
allocation routines provided by the run-time environment. Unfortunately,
such
routines are often crippled by unacceptable space/time overheads for
allocations
of smaller objects, hereby rendering a naive implementation of an allocator
for
use with the Standard Library Containers very ineffective. The suballocator
template remedies this problem by implementing an efficient suballocation
strategy on top of the naive allocator implementation.

<Read more at: http://groups.yahoo.com/group/boost/files/Suballocator/>


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