[v3] __pool_alloc multi lock
B. Kosnik
bkoz@nabi.net
Wed Jun 23 14:40:00 GMT 2004
>>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)
Thanks. Actually, testing with __pool_alloc as the default allocator ran
into some snags, so I'll be fine-tuning this patch today.
>>+ 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!?!
Ah! I see. My earlier message was confused.
Thanks for pointing this out.
-benjamin
More information about the Libstdc++
mailing list