1.1 --- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Thu Aug 29 06:53:16 2013 -0700 1.2 +++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp Fri Aug 30 07:31:47 2013 +0200 1.3 @@ -168,7 +168,15 @@ 1.4 // Set up the region size and associated fields. Given that the 1.5 // policy is created before the heap, we have to set this up here, 1.6 // so it's done as soon as possible. 1.7 - HeapRegion::setup_heap_region_size(Arguments::min_heap_size()); 1.8 + 1.9 + // It would have been natural to pass initial_heap_byte_size() and 1.10 + // max_heap_byte_size() to setup_heap_region_size() but those have 1.11 + // not been set up at this point since they should be aligned with 1.12 + // the region size. So, there is a circular dependency here. We base 1.13 + // the region size on the heap size, but the heap size should be 1.14 + // aligned with the region size. To get around this we use the 1.15 + // unaligned values for the heap. 1.16 + HeapRegion::setup_heap_region_size(InitialHeapSize, MaxHeapSize); 1.17 HeapRegionRemSet::setup_remset_size(); 1.18 1.19 G1ErgoVerbose::initialize();