Verified on 32 bit, it may be holds good for 64bit as well. does not show up on HeapSize options
==
Case1: Setting with 1GB no issues
-sh-4.1$ /opt/java/32/jdk-9/bin/java -Xmx1g -XX:+PrintFlagsFinal -version | grep HeapSize
size_t ErgoHeapSizeLimit = 0 {product}
size_t HeapSizePerGCThread = 67108864 {product}
size_t InitialHeapSize := 67108864 {product}
size_t LargePageHeapSizeThreshold = 134217728 {product}
size_t MaxHeapSize := 1073741824 {product}
uintx NonNMethodCodeHeapSize := 5541734 {pd product}
uintx NonProfiledCodeHeapSize := 123058253 {pd product}
uintx ProfiledCodeHeapSize := 123058253 {pd product}
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+127)
Java HotSpot(TM) Server VM (build 9-ea+127, mixed mode)
Cas2: Setting maximum than the allowed size
-sh-4.1$ /opt/java/32/jdk-9/bin/java -Xmx4g -XX:+PrintFlagsFinal -version | grep HeapSize
Invalid maximum heap size: -Xmx4g
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Issue when tried to set close to maximum heap allocated (4GB on 32 bit machine)
Case3:
-sh-4.1$ /opt/java/32/jdk-9/bin/java -Xmx3g -XX:+PrintFlagsFinal -version | grep HeapSize
-sh-4.1$
Prompt returns without showing HeapSize options
==
Case1: Setting with 1GB no issues
-sh-4.1$ /opt/java/32/jdk-9/bin/java -Xmx1g -XX:+PrintFlagsFinal -version | grep HeapSize
size_t ErgoHeapSizeLimit = 0 {product}
size_t HeapSizePerGCThread = 67108864 {product}
size_t InitialHeapSize := 67108864 {product}
size_t LargePageHeapSizeThreshold = 134217728 {product}
size_t MaxHeapSize := 1073741824 {product}
uintx NonNMethodCodeHeapSize := 5541734 {pd product}
uintx NonProfiledCodeHeapSize := 123058253 {pd product}
uintx ProfiledCodeHeapSize := 123058253 {pd product}
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+127)
Java HotSpot(TM) Server VM (build 9-ea+127, mixed mode)
Cas2: Setting maximum than the allowed size
-sh-4.1$ /opt/java/32/jdk-9/bin/java -Xmx4g -XX:+PrintFlagsFinal -version | grep HeapSize
Invalid maximum heap size: -Xmx4g
The specified size exceeds the maximum representable size.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Issue when tried to set close to maximum heap allocated (4GB on 32 bit machine)
Case3:
-sh-4.1$ /opt/java/32/jdk-9/bin/java -Xmx3g -XX:+PrintFlagsFinal -version | grep HeapSize
-sh-4.1$
Prompt returns without showing HeapSize options