From 494872e535a76ac4922e6f4e831a54c61225a258 Mon Sep 17 00:00:00 2001 From: Thomas Schatzl Date: Mon, 24 Aug 2015 16:32:50 +0200 Subject: [PATCH] 8133456: HeapRegionManager::shrink_by() iterates suboptimally across regions Reviewed-by: brutisso, tbenson --- hotspot/src/share/vm/gc/g1/heapRegionManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot/src/share/vm/gc/g1/heapRegionManager.cpp b/hotspot/src/share/vm/gc/g1/heapRegionManager.cpp index 0501f3237c2..dbb04841b0d 100644 --- a/hotspot/src/share/vm/gc/g1/heapRegionManager.cpp +++ b/hotspot/src/share/vm/gc/g1/heapRegionManager.cpp @@ -428,7 +428,7 @@ uint HeapRegionManager::shrink_by(uint num_regions_to_remove) { uncommit_regions(idx_last_found + num_last_found - to_remove, to_remove); - cur -= num_last_found; + cur = idx_last_found; removed += to_remove; }