问题描述
来自Java SE 6的Sun JVM的默认最大堆大小是多少(即相当于设置-Xmx)?
What is the default maximum heap size for Sun's JVM from Java SE 6 (i.e. equivalent to setting -Xmx)?
对于带有服务器的Java SE 5来说-class机器,
Looks like for Java SE 5 with a server-class machine, it's
奖金问题:对于IBM的JVM,您可以
Bonus question: Looks like for IBM's JVM you can ask it
java -verbose:sizes -version
你能同样问Sun的JVM吗?
Can you similarly ask Sun's JVM?
编辑:
我使用Runtime.getRuntime()。maxMemory来确认min(物理内存/ 4,1G),在。
I used Runtime.getRuntime().maxMemory to confirm min(physical memory/4, 1G), referenced in Sun documentation.
推荐答案
java 1.6.0_21或更高版本,或者......
java 1.6.0_21 or later, or so...
$ java -XX:+PrintFlagsFinal -version 2>&1 | grep MaxHeapSize
uintx MaxHeapSize := 12660904960 {product}
看起来像是min(1G )已被删除。
It looks like the min(1G) has been removed.
或在Windows上使用findstr
Or on Windows using findstr
C:\>java -XX:+PrintFlagsFinal -version 2>&1 | findstr MaxHeapSize
这篇关于Java SE 6中Sun的JVM的默认最大堆大小是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!