Details
Backports
Issue  Fix Version  Assignee  Priority  Status  Resolution  Resolved In Build 

JDK8014590  8  Thomas Schatzl  P4  Resolved  Fixed  b90 
JDK8180955  openjdk7u  Thomas Schatzl  P4  Resolved  Fixed  master 
Description
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.
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.
Issue Links
 duplicates

JDK6493335 Mismatch between Xm[sx] and verbose:gc output
 relates to

JDK8014058 Regression tests for 8006088
 if user specified arguments of one of Initial/Max  Heapsize conflict, give an error, i.e. Initial <= Max must hold true.
 otherwise adapt the nonspecified (default) argument values to the ones specified so that Initial <= Max holds true and the VM can start up.