Does your Eclipse 3.3.1 crash frequently? Here is help.
Are you running Eclipse 3.3.1 on Windows using a Sun JVM? Does it crash frequently? Then you are probably affected by a combination of a low PermGen size on Sun VMs (64mb by default) and Bug #203325. Read on for instructions on how to mitigate this.
Wait what is PermGen anyway?
PermGen stands for permanent generation and is the memory used to hold "data needed by the virtual machine to describe objects that do not have an equivalence at the Java language level. For example objects describing classes and methods are stored in the permanent generation" (related article). As it turns out the default size of 64m on Sun VMs is rather low for large apps like Eclipse. I tend to hit that barrier within 30 minutes. Normally the Eclipse command line arguments set the size to 256m, but Bug #203325 in Eclipse 3.3.1 prevents this. I was hit by this right after I upgraded to 3.3.1 this week. Fortunately, I was aware of the issue thanks to a discussion about OutOfMemory Errors at EclipseZone.
Here is what you can do:
- Edit your eclipse.ini to replace the --launcher.XXMaxPermSize 256m entries with the a working equivalent. Remember: on Windows with Sun VMs only. If you are using larger software stacks (i.e. Webtools) you may even want to increase the size beyond 256m. The FAQ entry "How do I increase the PermGen size available to Eclipse" has the background information.
Modified eclipse.ini Original eclipse.ini -showsplash org.eclipse.platform
-vmargs
-XX:MaxPermSize=256m
-Xms40m
-Xmx256m-showsplash org.eclipse.platform --launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m - Visit Bug #203325 to keep up with current developments. The issue has been fixed for the 3.3.2 service release, but there is a discussion going on about ways to make this fix available earlier.
Related Articles
