Fixing the Eclipse PermGen Space

Fixing the Eclipse PermGen Space (Out of Memory) Error
When Using JDK 1.6.0_21

Eclipse has a very serious bug where it does not properly pass the memory limits from eclipse.ini to Java. As a result, Eclipse quickly runs out of memory and crashes with little warning and few obvious error messages. This bug applies only to jkd1.6.0_21 and later on Windows, but applies equally to Eclipse 3.6 (Helios), Eclipse 3.5 (Ganymade), and Eclipse 3.4 (Europa). To fix this, go to the Eclipse installation folder (e.g., C:\eclipse) and add the following to the bottom of eclipse.ini:

  -XX:MaxPermSize=256m

See the resultant file below. You can also download my patched eclipse.ini file.

Patched eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256m
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m

 

Note that 256M is the default memory setting for Eclipse. If you choose to increase it, change the -XX:MaxPermSize accordingly. For more details, please see http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F and https://bugs.eclipse.org/bugs/show_bug.cgi?id=319514.

你可能感兴趣的:(PermGen space)