Skip to content

Commit 35000fb

Browse files
sunny868GoeLin
authored andcommitted
8213898: CDS dumping of springboot asserts in G1ArchiveAllocator::alloc_new_region
HeapRegionManager::find_highest_free needs to check if the region obtained from the HeapRegionManager::_regions is available. Backport-of: 14b7467
1 parent a4080b9 commit 35000fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hotspot/share/gc/g1/heapRegionManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ uint HeapRegionManager::find_highest_free(bool* expanded) {
286286
uint curr = max_length() - 1;
287287
while (true) {
288288
HeapRegion *hr = _regions.get_by_index(curr);
289-
if (hr == NULL) {
289+
if (hr == NULL || !is_available(curr)) {
290290
uint res = expand_at(curr, 1, NULL);
291291
if (res == 1) {
292292
*expanded = true;

0 commit comments

Comments
 (0)