Shared mutex pool

Jonathan Wakely jwakely@redhat.com
Mon Oct 3 10:29:00 GMT 2016


On 28/09/16 21:34 +0200, François Dumont wrote:
>Hi
>
>    Here is the patch to share a mutex pool between debug mode and 
>shared_ptr implementation. It saves 392 bytes on generated .so and 
>will make sure that fixing false sharing will impact both usages.
>
>    I preferred to leave implementation in shared_ptr.cc to avoid 
>introducing another translation unit.
>
>    * src/c++11/shared_ptr.cc (mask, invalid, get_mutex): Move
>    declaration...
>    * src/c++11/mutex_pool.h: ... here. New.
>    * src/c++11/debug.cc: Use latter.
>
>    Tested under Linux x86_64, normal and debug modes.
>
>Ok to commit ?

OK, thanks.



More information about the Libstdc++ mailing list