How to prevent Eclipse Europa PermGen crashes

I have been using Eclipse Europa (3.2), 64 bit version, for a few days and found that it constantly froze and crashed with PermGen space errors. From the internet it is obvious that this is a serious problem with Eclipse Europa as many people are experiencing the same problem.

At first I tried appending the VM flags -Xms 350 -Xmx 550m to the command line but this didn't work.

eclipse -vmargs -Xmx 350m -Xmx 550m

Unfortunalte this did not prevent the "java.lang.OutOfMemoryError: PermGen space" errors. In fact it appears to have no effect what so ever. I then read a tip about adjusting the MaxPermSize and this seems to have solved the problem. You need to run eclipse europa like so for it to work

eclipse -vmargs -XX:MaxPermSize=256m

This seems to have solved the problem for me. It appears that the "permanent generation" space is not part of the memory allocated by specifying the -Xmx arg to the vm. It is separate and currently default to 64 megs. To allocate more perm-gen space you need the -MaxPermSize arguement above. PermGen space,according to what I have read, holds reflective metadata such as class object and methods.  

Comments

Thanks a lot, I had the same problem using Eclipse Europa 3.3 (64 bits) and now it works perfectly !
Keep on giving good tips !

Thanks! I helped me on Ubuntu 8.04 32-bit with Eclipse Europe 3.3.2.