Set in_new_region and boundary_changed to true when collector steal a empty/trash region from mutator partition

This commit is contained in:
Xiaolong Peng 2026-06-02 23:00:17 -07:00
parent 2a8150ac2f
commit 383cf6e9c2

View File

@ -92,8 +92,10 @@ HeapWord* ShenandoahPartitionAllocator<PARTITION>::allocate(ShenandoahAllocReque
assert(stolen->is_empty(), "Stolen region must be empty");
HeapWord* result = allocate_in(stolen, req, boundary_changed);
_free_set->mark_region_used(PARTITION);
in_new_region = true;
boundary_changed = true;
// Stealing always produces a new region, which implies a boundary change.
_free_set->notify_allocation(PARTITION, /* in_new_region */ true, /* boundary_changed */ true);
_free_set->notify_allocation(PARTITION, in_new_region, in_new_region);
return result;
}
}