Boost logo

Boost Users :

From: Davi de Castro Reis (davicastro_at_[hidden])
Date: 2005-05-04 09:19:07


I am trying to improve the performance of a std::list instance in a
multi-thread application using boost::pool, but the syncronization
overhead is killing me.

The point is that all access to my std::list are serialized, so I would
like my pool to not use mutexes when retrieving memory in the pool,
which is what I suppose is happening (got evidence through valgrind).

 From the template parameters of boost pool, I think this is possible,
but I couldn't figure out how to do this. Any tips here?

pseudo code:

struct X;
std::list<X *, boost::fast_pool_allocator<X *> > l;

//fill l with 1000 X * instances

for (uint32 i = 0; i < 1000; ++i)
        X *x = l.front();

Thanks in advance,
Davi de Castro Reis

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at