From 6aa8eed3524f0c98bed367425ce052a1608cb578 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore <coleenp@openjdk.org> Date: Thu, 17 Dec 2020 13:35:09 +0000 Subject: [PATCH] 8258415: gtest for committed memory leaks reservation Reviewed-by: hseigel, stuefe --- test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp b/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp index 7dbaee5e6f7..83e6315c589 100644 --- a/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp +++ b/test/hotspot/gtest/runtime/test_committed_virtualmemory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -202,6 +202,8 @@ public: ASSERT_TRUE(result); ASSERT_EQ(2 * page_sz, committed_size); ASSERT_EQ(committed_start, (address)(base + page_sz)); + + os::release_memory(base, size); } };