[9, P1] RFR (S/M): 8180048: Interned string and symbol table leak memory during parallel unlinking
David Holmes
david.holmes at oracle.com
Fri May 12 07:33:55 UTC 2017
On 12/05/2017 4:49 PM, 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:
The order is critical for correctness.
> 176 BasicHashtableEntry<F>* volatile _free_list;
> ...
> 180 volatile int _number_of_entries;
>
> I think Hotspot uses "volatile $type $id" everywhere I saw.
It's different for pointers:
BasicHashtableEntry<F>* volatile _free_list;
_free_list is a volatile pointer to a non-volatile entry
volatile BasicHashtableEntry<F>* _free_list;
_free_list is a non-volatile pointer to a volatile entry
volatile BasicHashtableEntry<F>* volatile _free_list;
_free_list is a volatile pointer to a volatile entry
(I don't claim all volatile decls in hotspot necessarily have this right!)
Cheers,
David
> Thanks,
> -Aleksey
>
>
More information about the hotspot-gc-dev
mailing list