What is the default value for XX:MaxDirectMemorySize?
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.
sun.misc.VM
Runtime.getRuntime.maxMemory()
-Xmx
-XX:MaxDirectMemorySize
-Xmx5g
MaxDirectMemorySize
2.1m questions
2.1m answers
60 comments
57.0k users