[v3] libstdc++/24469
Paolo Carlini
pcarlini@suse.de
Thu Mar 16 08:19:00 GMT 2006
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.
More information about the Libstdc++
mailing list