
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 mutex std::list<int, monotonic::local_allocator<int> > thread_specific_global; // doesnt use mutex This is now in the sanbox at https://svn.boost.org/svn/boost/sandbox/monotonic/boost/monotonic/local_allo..., but untested. I am yet to write a test harness for multi-threaded applications.
Best, Vicente
Thanks for the idea Vicente, Regards, Christian PS. updated benchmark results for GCC and MSVC at http://tinyurl.com/lj6nab