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

Incompatible heap size flags accepted by VM

XMLWordPrintable

    • gc
    • b32
    • generic
    • generic

        The flags -XX:MaxHeapSize and -XX:InitialHeapSize are not communicating enough with each other and they seem to have different lower limits. Some examples:

        -XX:MaxHeapSize=4m -XX:InitialHeapSize=8m -> Runs with a heap of almost 8M
        -XX:MaxHeapSize=4m -XX:InitialHeapSize=4m -> Will not start (Incompatible minimum and initial heap sizes specified)
        -XX:MaxHeapSize=8m -XX:InitialHeapSize=4m -> Will not start (Incompatible minimum and initial heap sizes specified)
        -XX:MaxHeapSize=4m -> Runs with a heap of 5M
        -XX:MaxHeapSize=3m -> Runs with a heap of 4M
        -XX:MaxHeapSize=2m -> Runs with a heap of 3M
        -XX:InitialHeapSize=6m -> Will not start (Incompatible minimum and initial heap sizes specified)
        -XX:InitialHeapSize=7m -> Runs with a heap of 8.2M
        -XX:InitialHeapSize=8m -> Runs with a heap of 8.875M

        This is with Parallel GC. Other GCs behaves differently in some cases. G1 seems to be closest to working intuitively.

              tschatzl Thomas Schatzl
              jwilhelm Jesper Wilhelmsson
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: