Why is output of MaxHeapSze different when calling -XX:+PrintFlagsFinal and -XX:+PrintCommandLineFlags?

前端 未结 1 1858
逝去的感伤
逝去的感伤 2021-01-28 03:39

Just like the question, when I run the program with JVM option -XX+PrintFlagsFinal, I can see the printed MaxHeapSize as below:

 bool MaxFDLimit                          


        
相关标签:
1条回答
  • 2021-01-28 04:11

    The actual heap size may differ from what the user specified in the command line due to alignment and ergonomics adjustments. By default, the heap is 2MB aligned (see collectorPolicy.cpp).

    1044381696 is the final heap size after 2MB-alignment of 1043086336.

    0 讨论(0)
提交回复
热议问题