This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] mt_allocator performance improvements
- From: David Boreham <david_list at boreham dot org>
- To: libstdc++ at gcc dot gnu dot org
- Cc: Paolo Carlini <pcarlini at suse dot de>
- Date: Thu, 16 Mar 2006 14:40:15 -0700
- Subject: Re: [v3] mt_allocator performance improvements
- References: <20060315215545.61a6eed0.bkoz@redhat.com> <44199B32.7060705@suse.de> <44199FB9.20606@bozemanpass.com> <4419A11F.7020802@suse.de> <4419A260.8030003@bozemanpass.com> <4419A358.9080400@suse.de> <4419A3E0.5030900@bozemanpass.com> <4419A554.2090501@suse.de>
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.
---------------------