java默认xmx修改,Java 8中的默认Xmxsize
-Xmxsize Specifies the maximum size (in bytes) of the memory allocation pool in bytes ... The default
value is chosen at runtime based on system configuration.
What does system configuration mean?
解決方案
It varies on implementation and version, but usually it depends on the VM used (e.g. client or server, see -client and -server parameters) and on your system memory.
Often its default value is 1/4th of your physical memory or 1GB (whichever is smaller).
Also Java configuration options (command line parameters) can be "outsourced" to environment variables including the -Xmx, which can change the default (meaning specify a new default). Specifically the JAVA_TOOL_OPTIONS environment variable is checked by all Java tools and used if exists (more details here and here).
You can run the following command to see default values:
java -XX:+PrintFlagsFinal -version
It gives you a loooong list, -Xmx is in MaxHeapSize, -Xms is in InitialHeapSize. Filter your output (e.g. |grep on linux) or save it in a file so you can search in it.
總結
以上是生活随笔為你收集整理的java默认xmx修改,Java 8中的默认Xmxsize的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 静态分派_Java中的静态分派
- 下一篇: jmeter 取json值_JMeter