Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2000-12-05 12:50:57


--- In boost_at_[hidden], scleary_at_j... wrote:

>
> Maybe. If you have small object sizes, you can cut in underneath
the memory
> overhead of most system-supplied allocators. This is because these
system
> allocators have to store the size of the block along with the
block, so for,
> say, int-sized objects, you get 50% wasted memory. So once you
allocate
> FirstArraySize/2 chunks from a pool, your memory waste at worst-
case is the
> same as the system memory waste, until you start deallocating.

All this is good documentation of usage considerations :)

 
> > That's the point isn't it? It really is magic!
>
> It should be easy to use, but IMO memory allocation is not a huge
overhead
> in real-world programs. In my mind, pools should be used more for

While I might agree that many applications do not have performance
issues, for many "real-world" applications memory management is a
huge factor in performance. Products like smart heap wouldn't exist
if everyone could get by with the usual performance....

Jeff


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