Based on information from a lot of places (on stackoverflow here, here and here; and various other parts of the Internet) I've cobbled together an eclipse.ini that doesn't hose my system. Note that I'm on a 4GB MacBook Pro from early 2011.
I'm running the 64-bit Cocoa version of Eclipse. You'll find the eclipse.ini in
I'd also highly recommend turning on "Show heap status" in the "General" preferences section; this shows how much heap space you're using and lets you request garbage collection.
Aside from settings, I've also found that being diligent about keeping only the projects you need open is a big deal.
-startup ../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.100.v20110502 -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 384m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.6 -Declipse.p2.unsignedPolicy=allow -XX:MaxGCPauseMillis=1000 -XX:MaxHeapFreeRatio=70 -XX:+CMSIncrementalPacing -XX:+UnlockExperimentalVMOptions -XX:+UseFastAccessorMethods -XX:+UseCompressedOops -Dide.gc=true -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -XX:MaxPermSize=384m -Xms512m -Xmx2048m -Xdock:icon=../Resources/Eclipse.icns -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts
I'm running the 64-bit Cocoa version of Eclipse. You'll find the eclipse.ini in
Eclipse.app/Contents/MacOS/eclipse.ini.
I'd also highly recommend turning on "Show heap status" in the "General" preferences section; this shows how much heap space you're using and lets you request garbage collection.
Aside from settings, I've also found that being diligent about keeping only the projects you need open is a big deal.