Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2002-11-11 21:37:20

"Bohdan" <warever_at_[hidden]> wrote
> All boost::pool library is about allocation of small objects
> of the same size. I'm just curious how malloc can be
> accelerated if it handles different size allocations?
> May be boost will also need something like that.
> I understand that "char" can be treated as small object,
> but i'm not sure if boost::fast_pool_allocator gives any acceleration
> in this case.
malloc() cannot be accelerated very much: free() is missing information
allocated memory block size.

new/delete probably won't be accelerated a lot using some pool
management - new libraries took car of it already.

I did comparison of Alexandrescu's SmallObjAllocator<>
versus up-to-date allocators and found them much better. They (
Borland 6.0, Visual C++ 6.0 and Intel 6.0) use pools for small objects
and are also _significantly_ faster than even hand tuned C++ code.
I assume they are coded in assembler.

The only exception I found was Linux GCC 2.94: SmallObjAllocator<>
here has better characteristics (both speed/memory).


Boost list run by bdawes at, gregod at, cpdaniel at, john at