From e0700bf1d464762d0ee52c08e7e8668e9c8cfc3f Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Thu, 16 Dec 2021 13:39:24 +0000 Subject: [PATCH] 8278763: Parallel: Remove grows_up/grows_down in PSVirtualSpace Reviewed-by: tschatzl, mli --- src/hotspot/share/gc/parallel/psVirtualspace.cpp | 10 +++------- src/hotspot/share/gc/parallel/psVirtualspace.hpp | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/hotspot/share/gc/parallel/psVirtualspace.cpp b/src/hotspot/share/gc/parallel/psVirtualspace.cpp index 830aa54d2b1..c49701f5f7e 100644 --- a/src/hotspot/share/gc/parallel/psVirtualspace.cpp +++ b/src/hotspot/share/gc/parallel/psVirtualspace.cpp @@ -143,13 +143,9 @@ void PSVirtualSpace::verify() const { "bad reserved addrs"); assert(committed_low_addr() <= committed_high_addr(), "bad committed addrs"); - if (grows_up()) { - assert(reserved_low_addr() == committed_low_addr(), "bad low addrs"); - assert(reserved_high_addr() >= committed_high_addr(), "bad high addrs"); - } else { - assert(reserved_high_addr() == committed_high_addr(), "bad high addrs"); - assert(reserved_low_addr() <= committed_low_addr(), "bad low addrs"); - } + // committed addr grows up + assert(reserved_low_addr() == committed_low_addr(), "bad low addrs"); + assert(reserved_high_addr() >= committed_high_addr(), "bad high addrs"); } #endif // #ifndef PRODUCT diff --git a/src/hotspot/share/gc/parallel/psVirtualspace.hpp b/src/hotspot/share/gc/parallel/psVirtualspace.hpp index 4bb0547e3f1..413ae53404c 100644 --- a/src/hotspot/share/gc/parallel/psVirtualspace.hpp +++ b/src/hotspot/share/gc/parallel/psVirtualspace.hpp @@ -103,8 +103,6 @@ class PSVirtualSpace : public CHeapObj { bool is_aligned(size_t val) const; bool is_aligned(char* val) const; void verify() const; - virtual bool grows_up() const { return true; } - bool grows_down() const { return !grows_up(); } // Helper class to verify a space when entering/leaving a block. class PSVirtualSpaceVerifier: public StackObj {