[9, P1] RFR (S/M): 8180048: Interned string and symbol table leak memory during parallel unlinking

Mikael Gerdin mikael.gerdin at oracle.com
Fri May 12 07:28:39 UTC 2017


Hi Aleksey,

On 2017-05-12 08:49, Aleksey Shipilev wrote:
> On 05/12/2017 03:38 AM, David Holmes wrote:
>> On 12/05/2017 2:26 AM, Aleksey Shipilev wrote:
>>> Nits:
>>>
>>>  *) Modifier order?
>>>   176   BasicHashtableEntry<F>* volatile _free_list;
>>
>> _free_list is updated lock-free using Atomic::cmpxchg_ptr so it is appropriate
>> to mark it as being volatile.
>
> Of course. My comment was about the modifier _order_, see in the same file:
>
>  176   BasicHashtableEntry<F>* volatile _free_list;

For pointer types there is actually a difference between

volatile Foo* _ptr;

and

Foo* volatile _ptr;

in the first case _ptr is a non-volatile pointer to a volatile Foo and 
in the second case _ptr is a volatile pointer to a non-volatile Foo.

/Mikael

> ...
>  180   volatile int      _number_of_entries;
>
> I think Hotspot uses "volatile $type $id" everywhere I saw.
>
> Thanks,
> -Aleksey
>
>


More information about the hotspot-runtime-dev mailing list