Something about the mt_allocator.

Felix Yen fwy@alumni.brown.edu
Sun Feb 8 17:48:00 GMT 2004


Re: false sharing.
 >  Simply due to the fact that I do not know enough about this topic, 
especially
 >  across a variety of platforms. Suggestions/comments are as always 
appriciated!

I eventually concluded that no action is required.  I don't think 
there's any way to address false sharing in this style of allocator.  
The fundamental premise is that recycling blocks without coalescing 
them is a good idea.  This style of recycling probably does interfere 
with whatever the underlying allocator is doing to prevent false 
sharing.  Does this cost outweigh the benefit?  It depends on how 
recycling is done, how often it's used, and other factors including the 
quality of the underlying allocator.  So we just need test results 
demonstrating that the new allocator outperforms new_allocator (and 
pool_allocator).


Felix



More information about the Libstdc++ mailing list