changeset 8877:bdd657221274

8133456: HeapRegionManager::shrink_by() iterates suboptimally across regions Reviewed-by: brutisso, tbenson
author tschatzl
date Mon, 24 Aug 2015 16:32:50 +0200
parents 859d0f2dca76
children 52bbd44b2b7d 8af2c4220477 3dfd8c6b3f6c
files src/share/vm/gc/g1/heapRegionManager.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc/g1/heapRegionManager.cpp	Mon Aug 24 16:27:41 2015 +0200
+++ b/src/share/vm/gc/g1/heapRegionManager.cpp	Mon Aug 24 16:32:50 2015 +0200
@@ -428,7 +428,7 @@
 
     uncommit_regions(idx_last_found + num_last_found - to_remove, to_remove);
 
-    cur -= num_last_found;
+    cur = idx_last_found;
     removed += to_remove;
   }