Skip to content

Commit

Permalink
8213898: CDS dumping of springboot asserts in G1ArchiveAllocator::all…
Browse files Browse the repository at this point in the history
…oc_new_region

HeapRegionManager::find_highest_free needs to check if the region obtained from the HeapRegionManager::_regions is available.

Backport-of: 14b7467
  • Loading branch information
sunny868 authored and GoeLin committed Oct 27, 2023
1 parent a4080b9 commit 35000fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/gc/g1/heapRegionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ uint HeapRegionManager::find_highest_free(bool* expanded) {
uint curr = max_length() - 1;
while (true) {
HeapRegion *hr = _regions.get_by_index(curr);
if (hr == NULL) {
if (hr == NULL || !is_available(curr)) {
uint res = expand_at(curr, 1, NULL);
if (res == 1) {
*expanded = true;
Expand Down

1 comment on commit 35000fb

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.