8323428: Shenandoah: Unused memory in regions compacted during a full GC should be mangled

Reviewed-by: ysr, kdnilsen, shade
This commit is contained in:
William Kemper 2024-01-10 17:10:39 +00:00 committed by Aleksey Shipilev
parent b86c3b7a68
commit a7db4feceb

View File

@ -910,6 +910,9 @@ public:
// Make empty regions that have been allocated into regular
if (r->is_empty() && live > 0) {
r->make_regular_bypass();
if (ZapUnusedHeapArea) {
SpaceMangler::mangle_region(MemRegion(r->top(), r->end()));
}
}
// Reclaim regular regions that became empty