`

MyEclipse has detected that less than 5% of the 31MB of Eden Space (Heap memory)

    博客分类:
  • JAVA
 
阅读更多
解决办法:

D:\>cd D:\Users\Administrator\AppData\Local\MyEclipse\MyEclipse 9

D:\Users\Administrator\AppData\Local\MyEclipse\MyEclipse 9>myeclipse -vmargs -Xms256M -Xmx700M -XX:PermSize=150M -XX:MaxPermSize=300M

或者:
D:\java\eclipse\eclipse.exe -vmargs-Xms128m-Xmx512m-Xmx512m-XX:PermSize=64m-XX:MaxPermSize=128m



MyEclipse has detected that less than 5% of the 31MB of Eden Space (Heap memory)

一、使用myeclipse8.5出现如下问题:
 
MyEclipse has detected that less than 5% of the 31MB of Eden Space (Heap memory) space remains.
 
It is strongly recommended that you exit and restart MyEclipse with new virtual machine
memory paramters to increase this memory.  Failure to do so can result in data loss.
 
Recommended memory arguments: 
-vmargs
-Xmx512m
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=64m
 
 
 
二、解决办法:
 
1.在桌面为ECLIPSE.EXE新建一个快捷方式,打开快捷方式属性,在快捷方式选项的目标 
后面加上-vmargs-Xms128m-Xmx512m-Xmx512m-XX:PermSize=64m-XX:MaxPermSize=128m, 
例如: 
D:\java\eclipse\eclipse.exe -vmargs-Xms128m-Xmx512m-Xmx512m-XX:PermSize=64m-XX:MaxPermSize=128m 
昨天刚遇到这个问题,试着在INI文件里加入,刚用着还可以,但是过一会,又出现了问题。
 
2.
 
在使用myeclipse时遇到这样的提示:
 
myeclipse has detected that less than 5% of the 64MB of Perm Gen(Non_heap memory) space remains. 
It is strongly recommended that you exit and restart MyEclipse with new virtul machine memory paramters to increase this memory.Failure to do so can result in data loss. 
The recommended Eclipse memory parameters are: 
eclipse.exe –vmargs -Xms128m -Xmx512m -XX:PermSize=64m -XX:MaxPermSize=128m 

解决此问题可用以下命令:
 
命令是:eclipse.exe -vmargs -Xms256M -Xmx700M -XX:PermSize=150M -XX:MaxPermSize=300M
 
假设我的eclipse在E:\eclipse-SDK-3.2.1-win32\eclipse下面,则我需要的命令是:
 
cd E:\eclipse-SDK-3.2.1-win32\eclipse 

eclipse.exe –vmargs -Xms128m -Xmx512m  -XX:PermSize=64m -XX:MaxPermSize=128m
 
-vmargs:说明后面是VM的参数 -Xms40m:虚拟机占用系统的最小内存 -Xmx256m:虚拟机占用系统的最大内存 -XX:PermSize:最小堆大小。一般报内存不足时,都是说这个太小, 堆空间剩余小于5%就会警告,建议把这个稍微设大一点,不过要视自己机器内存大小来设置 -XX:MaxPermSize:最大堆大小。这个也适当大些 -Xmx512M的5%为25.6M,理论上要求-Xmx的数值与-XX:MaxPermSize必须大于25.6M


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics