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] mt_allocator performance improvements





Then, we have a problem, a serious one. Because __block->_M_thread_id in general is != __thread_id. In other terms, we are *not* preserving semantics. Do you agree?


Yes. This is a bug.


So Scott took a look at this. He said:

----------------------


// Return this block to our list and update counters and
// owner id as needed.
- --__bin._M_used[__block->_M_thread_id];
+ --__thread_bin._M_used;


Changed that line to:
--_M_thread_bin[__block->_M_thread_id][__which]._M_used;

This should have the desired effect. I ran 'make check' and had the same results as before.

---------------------






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