Request for review (S): 7102191 G1: assert(_min_desired_young_length <= initial_region_num) failed: Initial young gen size too small
bengt.rutisson at oracle.com
Mon Oct 24 20:54:34 UTC 2011
Could I have a couple of reviews for this small change?
When we use the NewRatio flag we set the min and max values for the
young gen to the same value. We do this just after we have let the GC
policy calculate min, initial and max values. However, if NewRatio is
being used we only care about the min and max values. Thus, the
update_young_list_size_using_newratio() method does not update any
This is what triggers the assert. In G1CollectorPolicy::init() first
calculates the "default" min, initial and max values, then we detect
that NewRatio is being used and we update min and max, but forget about
Looking a bit closer at the calculations it turns out that the initial
value is not needed. We only use it when we have a fixed young gen. In
this case min == initial == max per definition. So, either min or max
can be used instead of initial.
The fix is to delete the initial value calculation and the local variable.
7102191 G1: assert(_min_desired_young_length <= initial_region_num)
failed: Initial young gen size too small
More information about the hotspot-gc-dev