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


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.


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