Eclipse startup memory settings (Mac)

If you ever need to increase Eclipse's startup min max memory settings consider modifying the vm settings in the file eclipse.ini to increase your memory heap.

While Eclipse 3.1's default memory size has been increased to 40M minimum heap and 512M maximum heap, it may not be sufficient . In earlier versions of Eclipse (pre 3.1) my JVM continually crashed when loading up Sakai projects. Changing my startup min max memory settings appears to have righted the good ship Eclipse so I thought I would share my experience.

To change Eclipse's default min and max memory size settings, edit the file eclipse.ini. Editing this file represents a change from earlier versions of Eclipse, where startup settings were stored in Info.plist. Indeed, Info.plist includes the warning note:

<!-- WARNING:
If you try to add a single VM argument (-vmargs) here,
*all* vmargs specified in eclipse.ini will be ignored.
We recommend to add all arguments in eclipse.ini
-->

Finding eclipse.ini is a wee bit tricky. To locate it, right-click on the Eclipse Application icon and select "Show Package Contents", then double-click on the "Contents" folder and then double-click on the "MacOS" folder, the home of eclipse.ini. You can then edit the settings as I did below setting the min and max memory settings according to your evaluation of what your system requires.

You can also startup eclipse from the command line with appended -vmargs arguments but I'll leave it to others to outline that procedure.

Eclipse Ganymede
Version: 3.4.2
Build id: M20090211-1700

eclipse.ini
location: eclipse/Eclipse.app/Contents/MacOS/eclipse.ini

My changes (for the moment):

-showsplash
org.eclipse.platform
-startup
../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.101.R34x_v20080731
-vmargs
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
*-Xms128m*
*-Xmx1024m*
*-XX:+UseParallelGC*
-XX:MaxPermSize=256m
-Dosgi.requiredJavaVersion=1.5
-Dorg.eclipse.swt.internal.carbon.smallFonts

Default settings

-showsplash
org.eclipse.platform
-startup
../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.101.R34x_v20080731
-vmargs
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Dosgi.requiredJavaVersion=1.5
-Dorg.eclipse.swt.internal.carbon.smallFonts