RFR: 8309603: Deallocate hashtables in ClassLoaderData::unload
Coleen Phillimore
coleenp at openjdk.org
Tue Jul 11 21:19:15 UTC 2023
On Tue, 11 Jul 2023 00:01:54 GMT, Chad Rakoczy <duke at openjdk.org> wrote:
> [JDK-8309603](https://bugs.openjdk.org/browse/JDK-8309603)
>
> Memory is released in `ClassLoaderdata::~ClassLoaderData` for the dictionary and module hashtables but they could be deleted earlier in `ClassLoaderdata::unload`. Since we're unloading the class loader is no longer being used for lookup.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `tier2`
> - [x] Linux x86_64 release `tier2`
> - [x] Linux x86_64 fastdebug `gtest:all`
> - [x] Linux x86_64 release `gtest:all`
> - [x] Linux x86_64 fastdebug `test/hotspot/jtreg/runtime`
> - [x] Linux x86_64 release `test/hotspot/jtreg/runtime`
Changes requested by coleenp (Reviewer).
src/hotspot/share/classfile/classLoaderData.cpp line 749:
> 747: delete _packages;
> 748: _packages = nullptr;
> 749: }
Can you do packages too?
src/hotspot/share/classfile/classLoaderData.cpp line 751:
> 749: }
> 750:
> 751: if (_unnamed_module != nullptr) {
And maybe unnamed module?
-------------
PR Review: https://git.openjdk.org/jdk/pull/14820#pullrequestreview-1525169726
PR Review Comment: https://git.openjdk.org/jdk/pull/14820#discussion_r1260290615
PR Review Comment: https://git.openjdk.org/jdk/pull/14820#discussion_r1260290887
More information about the hotspot-runtime-dev
mailing list