RFR: 8329665: fatal error: memory leak: allocating without ResourceMark [v2]
Patricio Chilano Mateo
pchilanomate at openjdk.org
Mon Apr 15 17:39:00 UTC 2024
On Mon, 15 Apr 2024 16:19:41 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Patricio Chilano Mateo has updated the pull request incrementally with one additional commit since the last revision:
>>
>> take ResourceMark out of debug only
>
> src/hotspot/share/interpreter/oopMapCache.cpp line 184:
>
>> 182: }
>> 183:
>> 184: InterpreterOopMap::~InterpreterOopMap() {
>
> Question: If we remove this opportunistic cleanup of `_bit_mask`, does it mean we might introduce memory inefficiencies in cases where `InterpreterOopMap` is not covered by close-by `ResourceMark`?
In theory yes, although I doubt it is an actual issue because allocating in the resource area for this _bit_mask field is a rare case, and the memory allocated will be a few bytes. But I guess we can keep the eager cleanup just in case since it doesn't hurt.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18632#discussion_r1566212635
More information about the hotspot-dev
mailing list