PermGen内存用尽错误 Fixing java.lang.OutOfMemoryError: PermGen space

JAVA 在进行Eclipse的插件开发时如果直接运行Eclipse Application, 下面错误往往时常发生:

java.lang.OutOfMemoryError: PermGen space

错误原因

默认的情况下, Sun JRE的class loader(类的加载器)只能使用最多64M的内存, 如果有大量的类, 所需内存超过这个数字, 以上错误就产生了.

解决方案

在VM args里面增加-XX:MaxPermSize=***m, 如 -Dosgi.requiredJavaVersion=1.5 -Xms96m -Xmx868m -XX:MaxPermSize=464m

更多信息

  • PermGen错误往往只由SUN的JRE产生, 其他厂商的JRE似乎不会产生这个错误
  • 上面讲的只是一种情况, 不止是Eclipse, 很多其他Java软件如web服务器之类也很容易产生这个错误.
  • -XX:MaxPermSize与-Xmx没有直接关系

回應

windows 98 start-up problem

Hi. I'm running Windows 98 and am having a problem. When I start my computer, the Dell logo appears as always testking braindumps but then the screen goes black, with a blinking testking 640-802 space key in the upper left-hand corner. Then...nothing. When I reboot, the same thing happens but then the screen goes to boot-up options with safe-mode highlighted. I choose normal mode and again I get the blinking space key but this time everything comes up just fine. I tried scanreg /restore. This gives me testking certification the last 3 days, then 2 days from January. I need to go back a couple weeks. How can I choose a specific date to back up to? And is there anything else I can do to solve my dilemma? Thanks.