Just like the question, when I run the program with JVM option -XX+PrintFlagsFinal, I can see the printed MaxHeapSize as below:
bool MaxFDLimit = true {product}
uintx MaxGCMinorPauseMillis = 4294967295 {product}
uintx MaxGCPauseMillis = 4294967295 {product}
uintx MaxHeapFreeRatio = 70 {product}
**uintx MaxHeapSize := 1044381696 {product}**
intx MaxInlineLevel = 9 {product}
intx MaxInlineSize = 35 {product}
intx MaxJavaStackTraceDepth = 1024 {product}
While when I run the same program with JVM option -XX+PrintCommandLineFlags, I can see the MaxHeapSize as :
-XX:InitialHeapSize=65192896 **-XX:MaxHeapSize=1043086336** -XX:+PrintCommandLineFlags -XX:+UseCompressedClassPointers -XX:+UseCompressedOops -XX:-UseLargePagesIndividualAllocation -XX:+UseParallelGC
Can you tell me why these two are different? I thought they should be the same.