From 8c189909642bb045e256ebd791ae5f94d7f50300 Mon Sep 17 00:00:00 2001 From: "Y. Srinivas Ramakrishna" Date: Tue, 15 Sep 2009 16:50:50 -0700 Subject: [PATCH] 6861557: G1: assert(top() == bottom() || zfs == Allocated,"Region must be empty, or ...") Druing heap shrinking, check for emptiness of a region before modifying its ZF status. Reviewed-by: tonyp --- hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp index 4e89c8cf979..79a40355adf 100644 --- a/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp +++ b/hotspot/src/share/vm/gc_implementation/g1/heapRegionSeq.cpp @@ -302,9 +302,9 @@ MemRegion HeapRegionSeq::shrink_by(size_t shrink_bytes, if (cur->isHumongous()) { return MemRegion(last_start, end); } - cur->reset_zero_fill(); assert(cur == _regions.top(), "Should be top"); if (!cur->is_empty()) break; + cur->reset_zero_fill(); shrink_bytes -= cur->capacity(); num_regions_deleted++; _regions.pop();