Boost logo

Boost Users :

From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2008-08-05 18:13:54


AMDG

Domagoj Babic wrote:
> Hi all,
>
> I'm considering using boost::object_pool for my project. Reading the
> code, I found
> something that is seemingly suboptimal for my application:
>
> destroy in boost::object_pool calls object_pool::free, which calls (eventually)
> simple_segregated_storage::ordered_free. From the code (and documentation), it
> seems to me that only simple_segregated_storage::malloc_n uses that ordering.
>

An object_pool destroys all allocated objects when it is destroyed.
In order to accomplish this, it uses a sorted free list and on destruction
iterates over the storage and the free list in parallel destroying all
objects not in the free list.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net