G1: NewSize not bounded by InitialHeapSize or MaxHeapSize

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P5
    • 26
    • Affects Version/s: 8, 11, 17, 21, 25, 26
    • Component/s: hotspot
    • gc
    • b25

      G1 GC does not validate or correct inconsistencies between -XX:NewSize / -XX:MaxNewSize and -XX:MaxHeapSize / -XX:InitialHeapSize. As a result, it’s possible to specify a NewSize or MaxNewSize larger than the total heap size, and the JVM accepts these settings without warning or correction.

      $ java -Xmn20G -XX:+PrintFlagsFinal -version
         size_t InitialHeapSize = 8342470656 {product} {ergonomic}
         size_t MaxHeapSize = 8342470656 {product} {ergonomic}
         size_t MaxNewSize = 21474836480 {product} {command line}
         size_t NewSize = 21474836480 {product} {command line}

      Here, both NewSize and MaxNewSize exceed the MaxHeapSize.

      Cleanup the argument parsing to set the
      NewSize/MaxNewSize within the bounds of InitialHeapSize as well as MaxHeapSize

            Assignee:
            Axel Boldt-Christmas
            Reporter:
            Ivan Walulya
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: