我目前Eclipse所在的机器环境是windows x32, 4GBRAM, CPUx2, JDK1.7 x86,
具体参数意义请自行查阅, 根据自己机器内存环境设定
32位机器下查看JVM支持的最大内存:
java -Xmx1200M -version
-ea
-server
-Xmx900m
-Xms900m
-Xmn120m
-Xverify:none
-Xnoclassgc
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:CompileThreshold=3000
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:+DisableExplicitGC
-XX:+UserLargePages
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=85
-Dcom.sum.management.jmxremote
-Dosgi.requiredJavaVersion=1.6
64位,稍大一点内存用的:
-ea
-server
-Xmx1536m
-Xms1536m
-Xmn200m
-Xverify:none
-Xnoclassgc
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:CompileThreshold=3000
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:+UseCompressedOops
-XX:+DisableExplicitGC
-XX:+UserLargePages
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=85
intelliJ同样适用:
-ea
-server
-Xmx1536m
-Xms1536m
-Xmn200m
-Xverify:none
-Xnoclassgc
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:CompileThreshold=3000
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:+UseCompressedOops
-XX:+DisableExplicitGC
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled
-XX:+UseCMSCompactAtFullCollection
-XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=85
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djsse.enableSNIExtension=false