This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Shared mutex pool


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]