From bc05893f820ff8158897f84b9d2fdaed2cd1661b Mon Sep 17 00:00:00 2001 From: Albert Mingkun Yang Date: Tue, 9 Jan 2024 19:37:28 +0000 Subject: [PATCH] 8323318: Remove unused Space::is_free_block Reviewed-by: tschatzl --- src/hotspot/share/gc/shared/space.cpp | 4 ---- src/hotspot/share/gc/shared/space.hpp | 5 ----- 2 files changed, 9 deletions(-) diff --git a/src/hotspot/share/gc/shared/space.cpp b/src/hotspot/share/gc/shared/space.cpp index b6dc4e1e7d8..67d3ad53383 100644 --- a/src/hotspot/share/gc/shared/space.cpp +++ b/src/hotspot/share/gc/shared/space.cpp @@ -74,10 +74,6 @@ void ContiguousSpace::clear(bool mangle_space) { } } -bool ContiguousSpace::is_free_block(const HeapWord* p) const { - return p >= _top; -} - #ifndef PRODUCT void ContiguousSpace::set_top_for_allocations(HeapWord* v) { diff --git a/src/hotspot/share/gc/shared/space.hpp b/src/hotspot/share/gc/shared/space.hpp index 541747e38f8..8299a7e6289 100644 --- a/src/hotspot/share/gc/shared/space.hpp +++ b/src/hotspot/share/gc/shared/space.hpp @@ -133,9 +133,6 @@ class Space: public CHeapObj { // given address. bool is_in_reserved(const void* p) const { return _bottom <= p && p < _end; } - // Returns true iff the given block is not allocated. - virtual bool is_free_block(const HeapWord* p) const = 0; - // Test whether p is double-aligned static bool is_aligned(void* p) { return ::is_aligned(p, sizeof(double)); @@ -273,8 +270,6 @@ protected: size_t used() const override { return byte_size(bottom(), top()); } size_t free() const override { return byte_size(top(), end()); } - bool is_free_block(const HeapWord* p) const override; - // In a contiguous space we have a more obvious bound on what parts // contain objects. MemRegion used_region() const override { return MemRegion(bottom(), top()); }