From 383cf6e9c26bf00c9130a46f457ca35ed3426d2d Mon Sep 17 00:00:00 2001 From: Xiaolong Peng Date: Tue, 2 Jun 2026 23:00:17 -0700 Subject: [PATCH] Set in_new_region and boundary_changed to true when collector steal a empty/trash region from mutator partition --- .../share/gc/shenandoah/shenandoahPartitionAllocator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hotspot/share/gc/shenandoah/shenandoahPartitionAllocator.cpp b/src/hotspot/share/gc/shenandoah/shenandoahPartitionAllocator.cpp index 560fff81518..148684cf09e 100644 --- a/src/hotspot/share/gc/shenandoah/shenandoahPartitionAllocator.cpp +++ b/src/hotspot/share/gc/shenandoah/shenandoahPartitionAllocator.cpp @@ -92,8 +92,10 @@ HeapWord* ShenandoahPartitionAllocator::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; } }