Boost logo

Boost :

From: christopher baus (christopher_at_[hidden])
Date: 2005-12-22 03:53:43

I've been playing around with ways to remove some of the hits to the
global allocator from asio/detail/reactor_op_queue.hpp, and decided to try
an alternative approach to pooling.

Instead of overriding STL allocators or global new/delete, I decided to
implement pooled lists in terms of lists themselves. I take advantage of
the fact that list::splice doesn't realloc nodes to move value data
between the active and free lists during insert and erase operations.

Chris's hash_map stores the value data in a std::list. I made that a
template parameter, which allowed me to optionally specify the

The implementation is here:

This doesn't address the bigger problem of the handler allocation, but
pre-allocing of the hash_map on *nix makes me a bit happier with the


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