🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Eclipse eating all my memory, then barfing all over

Started by
3 comments, last by 255 16 years, 1 month ago
So I decided to give Eclipse a try for Java development, since GEdit + command line started to get a bit cumbersome. Except that it's horribly slow, it seems to be a great IDE so far. Unfortunately though, it'll only run for a dozen recompilations or so, then it tells me the Java VM is out of memory and therefore can't create more threads, and then asks me if I want to exit. WTF is this, and does anybody know how to fix it? I'm running it under Debian testing, with a gig of RAM (no swap) and Java 6. If I can edit 5-6 images in the 1500x3000px size at the same time, Eclipse ought to be able to run for more than five minutes without killing itself.
Advertisement
Ram ram more ram!
And swap ofc, who does not use swap? Especially when having (only) a gig of ram.
(When linux runs out of ram it kills processes without care)

And manually activating garbage collection does not help?
I havn't tried it on linux, but maybe look into the command line args you're using. There's a whole bunch of them to control the max heap size and various other bits of behaviour to do with memory use and swapping. Maybe try a different build (the latest stable ones are usually good) to see if it's an issue with that particular build.

Failing that, the people in #eclipse are usually very helpful and knowledgeable.
Make sure your using Sun Java (or OpenJDK) and not GCJ (seems to act worse). Not sure if its still true but /etc/eclipse/java_home may have the wrong JVM in it. Also modifying the memory settings and other parameters in eclipse.ini can help also.
I had similar problems after installing lots of plugins, and the solution was to increase the heap size in eclipse.ini.

Here are my current settings:
-showsplash
org.eclipse.platform
-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=128m

This topic is closed to new replies.

Advertisement