5 Aug
2008
5 Aug
'08
10:13 p.m.
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