RFR (S): 8152724: Sum of Eden, survivor and old capacity may be larger than heap size

Thomas Schatzl thomas.schatzl at oracle.com
Thu Nov 29 14:26:54 UTC 2018

Hi all,

  can I have reviews for this small change that fixes some bug in
determining the "correct" number of maximum survivor regions for the
current GC?

Currently the maximum survivor regions are calculated directly from
maximum eden size divided by SurvivorRatio. If the eden is large, and
SurvivorRatio small, this could result in strange log output indicating
that there is more space in the Java heap available than there
actually is space :)

Of course this is not true, and in reality the GC would go into an
evacuation failure before allocating that many regions, but
nevertheless the output is incorrect.

This change limits the internal max survivor size variable used for
printing to the amount of free space.

new test, hs-tier1-3


More information about the hotspot-gc-dev mailing list