RFR: 8329665: fatal error: memory leak: allocating without ResourceMark

Patricio Chilano Mateo pchilanomate at openjdk.org
Fri Apr 5 13:37:10 UTC 2024


On Fri, 5 Apr 2024 07:10:18 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> TBH, seems rather odd to do this in debug mode only, and this far out. I see other places where we do `ResourceMark rm` near `OopMapCache::compute_one_oop_map`. Should we instead do:
> 
> ```
>   // process locals & expression stack
>   ResourceMark rm;
>   InterpreterOopMap mask;
>   if (query_oop_map_cache) {
>     m->mask_for(bci, &mask);
>   } else {
>     OopMapCache::compute_one_oop_map(m, bci, &mask);
>   }
>   mask.iterate_oop(&blk);
> ```
> 
> ?
>
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.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18632#issuecomment-2039820666


More information about the hotspot-dev mailing list