[PATCH] Remove volatile qualifiers from mt_allocator

Paolo Carlini pcarlini@suse.de
Wed Aug 30 12:18:00 GMT 2006


Paolo Carlini wrote:

> Richard Guenther wrote:
>
>> This patch removes volatile qualifiers from pointer members in 
>> mt_allocator.h.  It doesn't change function signatures and so
>> should be ABI safe.
>>
>> Bootstrapped and tested on x86_64-unknown-linux-gnu some time ago.
>>
>> _M_free and _M_used pointers need not be volatile, they are written
>> in __pool::_M_initialize() only.
>
> Can you please study a bit libstdc++/24469, before we go ahead with 
> this kind of clean-up? You can start from line # 295 in mt_allocator.cc

Now I see that, contrary to my recollections, for some (crazy ;) reason 
the _M_used pointer is typed as volatile, *not* the pointed-to memory. 
Therefore, I think removing those volatiles cannot hurt, in any case.

Paolo.



More information about the Libstdc++ mailing list