Skip to content

Commit 4e6d34f

Browse files
committed
8275440: Remove VirtualSpaceList::is_full()
Backport-of: c9e65f8ef926c3796867558afa536770eed71cd6
1 parent 858c53b commit 4e6d34f

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

src/hotspot/share/memory/metaspace/virtualSpaceList.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,6 @@ bool VirtualSpaceList::contains(const MetaWord* p) const {
200200
return false;
201201
}
202202

203-
// Returns true if the vslist is not expandable and no more root chunks
204-
// can be allocated.
205-
bool VirtualSpaceList::is_full() const {
206-
if (!_can_expand && _first_node != NULL && _first_node->free_words() == 0) {
207-
return true;
208-
}
209-
return false;
210-
}
211-
212203
// Convenience methods to return the global class-space chunkmanager
213204
// and non-class chunkmanager, respectively.
214205
VirtualSpaceList* VirtualSpaceList::vslist_class() {

src/hotspot/share/memory/metaspace/virtualSpaceList.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ class VirtualSpaceList : public CHeapObj<mtClass> {
128128
// Returns true if this pointer is contained in one of our nodes.
129129
bool contains(const MetaWord* p) const;
130130

131-
// Returns true if the list is not expandable and no more root chunks
132-
// can be allocated.
133-
bool is_full() const;
134-
135131
// Convenience methods to return the global class-space vslist
136132
// and non-class vslist, respectively.
137133
static VirtualSpaceList* vslist_class();

test/hotspot/gtest/metaspace/test_chunkManager_stress.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ class ChunkManagerRandomChunkAllocTest {
6161
return max_chunks;
6262
}
6363

64-
// Return true if, after an allocation error happened, a reserve error seems likely.
64+
// Return true if, after an allocation error happened, a reserve error seems possible.
6565
bool could_be_reserve_error() {
66-
return _context.vslist().is_full();
66+
return _context.reserve_limit() < max_uintx;
6767
}
6868

6969
// Return true if, after an allocation error happened, a commit error seems likely.

0 commit comments

Comments
 (0)