diff src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp @ 942:2c79770d1f6e

6819085: G1: use larger and/or user settable region size Summary: Instead of the region size being hard-coded, allow the user to set it. Reviewed-by: jmasa, johnc, apetrusenko
author tonyp
date Thu, 30 Jul 2009 16:22:58 -0400
parents e1fdf4fd34dc
children fc06cd9b42c7
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Wed Sep 02 00:04:29 2009 -0700
+++ b/src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp	Thu Jul 30 16:22:58 2009 -0400
@@ -201,6 +201,11 @@
   _survivors_age_table(true)
 
 {
+  // Set up the region size and associated fields. Given that the
+  // policy is created before the heap, we have to set this up here,
+  // so it's done as soon as possible.
+  HeapRegion::setup_heap_region_size(Arguments::min_heap_size());
+
   _recent_prev_end_times_for_all_gcs_sec->add(os::elapsedTime());
   _prev_collection_pause_end_ms = os::elapsedTime() * 1000.0;