[v3] __pool_alloc multi lock
Paolo Carlini
pcarlini@suse.de
Wed Jun 23 09:12:00 GMT 2004
B. Kosnik wrote:
>This removes the single _S_lock, and its export from the libstdc++
>shared library. It's been replaced with an array of mutexes.
>
>
Cool. A minor nit (I think is the same of a few days ago)
>+ size_t __i = ((__bytes + (size_t)_S_align - 1) / (size_t)_S_align - 1);
>+ return *_S_mutexes[__i - 1];
>
>
Benjamin, here, if __bytes < (size_t)_S_align + 1 (and > 0) then __i ==
0 and
_S_mutexes is indexed to -1: watch the parentheses!?!
Paolo.
More information about the Libstdc++
mailing list