RFR: 8329665: fatal error: memory leak: allocating without ResourceMark
Aleksey Shipilev
shade at openjdk.org
Fri Apr 5 15:27:08 UTC 2024
On Fri, 5 Apr 2024 13:34:07 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
> That was the other option, and to remove the manual freeing in ~InterpreterOopMap(). But it would add more overhead to this call and I didn't think it was worth it. But if we want to go that route I could run some set of benchmarks to make sure it doesn't change anything.
Yeah, it bothers me adding RMs for debug paths only: it would silently work in debug builds if there are new resource allocations in downstream code, and release builds would silently break. Placing debug-only RM at the beginning of large method only makes it worse.
The good reason for debug-only-ing RMs is when we need the assert/logs, but even that RM scope is usually very clear, and ends after the relevant debugging/assert thing is done. Here, not so much.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18632#issuecomment-2040080092
More information about the hotspot-dev
mailing list