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: [v3] libstdc++/24469


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.


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