Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8370494

G1: NewSize not bounded by InitialHeapSize or MaxHeapSize

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P5 P5
    • 26
    • 8, 11, 17, 21, 25, 26
    • hotspot
    • gc

      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

            iwalulya Ivan Walulya
            iwalulya Ivan Walulya
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: