RFR: JDK-8298084: Memory leak in Method::build_profiling_method_data
Tobias Hartmann
thartmann at openjdk.org
Wed Dec 7 08:27:05 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`.
src/hotspot/share/oops/method.cpp line 602:
> 600:
> 601: if (!Atomic::replace_if_null(&method->_method_data, method_data)) {
> 602: method_data->release_C_heap_structures();
What about leaving the `_extra_data_lock` as is and explicitly calling `~MethodData()` here?
-------------
PR: https://git.openjdk.org/jdk/pull/11526
More information about the hotspot-dev
mailing list