eclipse 内存不够用,加载多个项目经常报Internal Error

错误如下:

An out of memory error has occurred.Consult the "Running Eclipse" section of the read me file for information on preventing this kind of error in future.
You are recommended to exit the workbench.
Subsequent errors may happen and may terminate the workbench without warning.
See the .log file for more details.
解决方法:

1、启动ecplise时,单击ecplise标图 右键-》属性-》快捷方式-》目标 里面加-clean  -vmargs -Xms512m -Xmx800m -XX:PermSize=256m;参数可适当的修改

jvm参数如下:
jvm参数配置

a: -Xmx<n>                      

指定 jvm 的最大 heap 大小 , 如 :-Xmx=2g


b: -Xms<n>                      

指定 jvm 的最小 heap 大小 , 如 :-Xms=2g , 高并发应用, 建议和-Xmx一样, 防止因为内存收缩/突然增大带来的性能影响。


c: -Xmn<n>                      

指定 jvm 中 New Generation 的大小 , 如 :-Xmn256m。 这个参数很影响性能, 如果你的程序需要比较多的临时内存, 建议设置到512M, 如果用的少, 尽量降低这个数值, 一般来说128/256足以使用了。


d: -XX:PermSize=<n>

指定 jvm 中 Perm Generation 的最小值 , 如 :-XX:PermSize=32m。 这个参数需要看你的实际情况,。 可以通过jmap 命令看看到底需要多少。


e: -XX:MaxPermSize=<n>          

指定 Perm Generation 的最大值 , 如 :-XX:MaxPermSize=64m

猜你喜欢

转载自xu-nuo.iteye.com/blog/2371186