RFR: JDK-8303605: Memory leaks in Metaspace gtests

Thomas Stuefe stuefe at openjdk.org
Sat Mar 4 09:36:05 UTC 2023


On Sat, 4 Mar 2023 09:29:03 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Fix memory leaks identified while running Metaspace gtests.
>
> test/hotspot/gtest/metaspace/test_freeblocks.cpp line 103:
> 
>> 101:       DEBUG_ONLY(_freeblocks.verify();)
>> 102:     }
>> 103:   }
> 
> Can you reshape this a bit pls: let deallocate_top return bool (false if nothing removed) and do
> 
> void deallocate_all() {
>   while (!deallocate_top());
> }

I'm a bit concerned about runtime. Does the runtime for these tests increase, since the verification on every deallocation is a bit overboard?

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

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


More information about the hotspot-runtime-dev mailing list