When using -Xmx flag, what happens if the argument given exceed physical memory?

落花浮王杯 提交于 2019-12-25 17:01:41

问题


When using -Xmx flag, what happens if the argument given exceed physical memory?

Also is there any way to explicitly make JVM to use a specific amount of memory using paging?


回答1:


See for yourself:

JVM fails in getting enough memory for the heap and exits.

I don't think there is a way to make JVM use a specific amount of memory for paging, but you can use:

-XX:+|-UseLargePages --for large page support

and -XXLargePageSizeInBytes=<n> --for specifying how large your large pages can be.

Look at http://docs.oracle.com/javase/7/docs/technotes/tools/solaris/java.html



来源:https://stackoverflow.com/questions/24130251/when-using-xmx-flag-what-happens-if-the-argument-given-exceed-physical-memory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!