< prev index next >
src/share/vm/gc/g1/g1CollectorPolicy.cpp
Print this page
*** 239,256 ****
assert(GCTimeRatio > 0,
"we should have set it to a default value set_g1_gc_flags() "
"if a user set it to 0");
_gc_overhead_perc = 100.0 * (1.0 / (1.0 + GCTimeRatio));
! uintx reserve_perc = G1ReservePercent;
! // Put an artificial ceiling on this so that it's not set to a silly value.
! if (reserve_perc > 50) {
! reserve_perc = 50;
! warning("G1ReservePercent is set to a value that is too large, "
! "it's been updated to " UINTX_FORMAT, reserve_perc);
! }
! _reserve_factor = (double) reserve_perc / 100.0;
// This will be set when the heap is expanded
// for the first time during initialization.
_reserve_regions = 0;
_ihop_control = create_ihop_control();
--- 239,250 ----
assert(GCTimeRatio > 0,
"we should have set it to a default value set_g1_gc_flags() "
"if a user set it to 0");
_gc_overhead_perc = 100.0 * (1.0 / (1.0 + GCTimeRatio));
! guarantee(G1ReservePercent <= 50, "Range checking should not allow values over 50.");
! _reserve_factor = (double) G1ReservePercent / 100.0;
// This will be set when the heap is expanded
// for the first time during initialization.
_reserve_regions = 0;
_ihop_control = create_ihop_control();
< prev index next >