RFR: 8301992: Embed SymbolTable CHT node [v3]
Ioi Lam
iklam at openjdk.org
Thu Feb 16 01:29:13 UTC 2023
On Wed, 15 Feb 2023 23:51:26 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Yes, it seemed dubious if we ever freed the entry from the symbol arena, so I think it's ok. It would only free the Symbol if it was the last one allocated and there was a race when inserting the same permanent symbol in the table.
>>
>> You're right there would be a bug if we tried to free a CHeap allocated symbol from the arena if the refcount became permanent. I'm not sure what would happen in that case.
>
> Oh but if it overflows the refcount to become permanent, the permanence is sticky. We won't free it, so it's not a bug.
>From the comment above this code, it seems we do free permanent symbols, but only when the current thread lost when competing to insert a symbol for the boot loader. So the old code is correct, and the new code would have a leak.
-------------
PR: https://git.openjdk.org/jdk/pull/12562
More information about the hotspot-dev
mailing list