G:\oldbak\tools\eclipse\eclipse.exe Eclipse -debug options -vm javaw.exe -clean -vmargs -Xms128M -Xmx1024M -XX:PermSize=64M -XX:MaxPermSize=128M
1、在eclipse的安装路径下建一个文件叫options,千万别有扩展名
然后添加内容如下:
org.eclipse.ui/perf/showHeapStatus=true 保存并退出
2、右击eclipse/myeclipse的快捷方式--快捷方式--目标,加入如下内容
Eclipse -debug options -vm javaw.exe
修改后可如下形式:
E:\Tools\eclipse\eclipse.exe Eclipse -debug options -vm javaw.exe
3、重启eclipse
会发现右下角有个小垃圾桶的图标,点一下就做垃圾回收,释放eclipse占用的多余的内存空间。
在使用eclipse的过程中,时不时就会出现“内存溢出”的问题,一个解决办法就是在启动eclipse时增加其内存使用,通过命令行方式:
eclipse -vmargs -Xms512m -Xmx1024m
不过,增加的是虚拟内存,而不是物理内存。
不过也可以在eclipse的目录下,修改eclipse.ini文件:
-vmargs -Xms64m -Xmx512m
原理是一样的!