RFR: JDK-8298084: Memory leak in Method::build_profiling_method_data

Tobias Hartmann thartmann at openjdk.org
Tue Dec 6 15:29:00 UTC 2022


On Tue, 6 Dec 2022 06:13:23 GMT, Justin King <jcking at openjdk.org> wrote:

> Resolve memory leak related to `MethodData::_extra_data_lock` in `Method::build_profiling_method_data` by defining `MethodData::release_C_heap_structures` and calling it where appropriate before deallocating `MethodData`.

FTR, I changed this code with [JDK-8297389](https://bugs.openjdk.org/browse/JDK-8297389) and thereby accidentally introduced the leak. Thanks for fixing!

The fix looks good to me, but I'm not an expert in that area.

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

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11526


More information about the hotspot-dev mailing list