[v3] mt_allocator performance improvements
Richard Guenther
richard.guenther@gmail.com
Thu Mar 16 17:39:00 GMT 2006
On 3/16/06, Paolo Carlini <pcarlini@suse.de> wrote:
> All, Richard,
>
> I suspect today's crazy exchange is ultimately due to this line in the
> performance improvement:
>
> >- --__bin._M_used[__block->_M_thread_id];
> >+ --__thread_bin._M_used;
> >
> >
> which, at the moment, I cannot convince myself is right, i.e., changes
> *only* the details of the implementation of the allocator without
> affecting the algorithm.
The above simply accepts accounting _M_used to the wrong bin, or declares
deallocating from a different thread than allocating invalid (at least
for accounting).
It also avoids the mess that the PR was about ;)
Richard.
More information about the Libstdc++
mailing list