Boost logo

Boost :

Subject: Re: [boost] Proposal: Monotonic Containers- Thread specific monotonic allocator
From: Christian Schladetsch (christian.schladetsch_at_[hidden])
Date: 2009-06-21 19:34:18

Hi Vicente,

what do you think about having a monotonic allocator using a thread specific
> storage so this allocator will not need to use a mutex to protect the
> allocation?

This seems like a good idea. How about:

std::list<int, monotonic::allocator<int> > global;
std::list<int, monotonic::shared_allocator<int> > shared_global; // uses
std::list<int, monotonic::local_allocator<int> > thread_specific_global; //
doesnt use mutex

This is now in the sanbox at,
but untested. I am yet to write a test harness for multi-threaded

> Best,
> Vicente

Thanks for the idea Vicente,


PS. updated benchmark results for GCC and MSVC at

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