hotspot/src/share/vm/gc/g1/heapRegion.cpp
changeset 38011 74a6871d896b
parent 37989 e0a0f4de45c4
child 38154 4c30333c304e
--- a/hotspot/src/share/vm/gc/g1/heapRegion.cpp	Thu Apr 21 10:18:50 2016 +0200
+++ b/hotspot/src/share/vm/gc/g1/heapRegion.cpp	Thu Apr 21 10:19:00 2016 +0200
@@ -153,6 +153,10 @@
 
   guarantee(CardsPerRegion == 0, "we should only set it once");
   CardsPerRegion = GrainBytes >> CardTableModRefBS::card_shift;
+
+  if (G1HeapRegionSize != GrainBytes) {
+    FLAG_SET_ERGO(size_t, G1HeapRegionSize, GrainBytes);
+  }
 }
 
 void HeapRegion::reset_after_compaction() {