Default for XX:MaxDirectMemorySize

后端 未结 3 1060
太阳男子
太阳男子 2021-01-01 09:31

What is the default value for XX:MaxDirectMemorySize?

3条回答
  •  长发绾君心
    2021-01-01 10:07

    From sun.misc.VM, it's Runtime.getRuntime.maxMemory(), that's what is configured with -Xmx. E. g. if you don't configure -XX:MaxDirectMemorySize and do configure -Xmx5g, the "default" MaxDirectMemorySize will also be 5 Gb, and the total heap+direct memory usage of the app may grow up to 5 + 5 = 10 Gb.

提交回复
热议问题