This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] libstdc++/24469
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 16 Mar 2006 09:20:54 +0100
- Subject: Re: [v3] libstdc++/24469
- References: <20060316014442.e21a6fff.bkoz@redhat.com>
Hi Benjamin,
// Counters used to keep track of the amount of blocks
// that are on the freelist/used for a thread id and bin.
- size_t volatile _M_free;
- size_t volatile _M_used;
+ _Atomic_word _M_free;
+ _Atomic_word _M_used;
my only immediate concern (I supposed we can tackle the performance
issues with follow up refinements) with this approach is the size of
_Atomic_word. Well, actually this concern of mine goes beyond
mt_allocator... On 64-bit machines we have to make sure the counters are
64 bit, or, alternately, watch for risks of overflows and do something
special. I'm afraid that at least some 64-bit targets are not ok at the
moment... What do you think?
Paolo.