December 10, 2007 3

Eclipse – Available Memory is Low

By Levi Senft in Mac
Eclipse - "Available Memory is Low"

Available Memory is LowMyEclipse has detected that less than 5% of the 64MB of Perm Gen (Non-heap memory) space remains.

It is strongly recommended that you exit and restart MyEclipse with new virtual machien memory parameters to increase this memory,  Failure to do so can result in data loss.

The recommended Eclipse memory parameters are:
eclipse.exe -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M

Low Memory Error

I get this warning all the time, the problem is that I’m on a Mac and I don’t have an exe to run from he command line. Usually I just close and restart eclipse and I’m good for another couple of hours. This time was finally one time too many. After a little digging I found that I was able to add these command line parameters to a configuration file.

On my system Eclipse.app located at /Applications/eclipse/Eclipse.app, in that same folder is a file, eclipse.ini. This is where you can add your parameters. After tweaking my eclipse.ini, it ended up like this:

-showsplash
org.eclipse.platform
-vmargs
-Xms128m
-Xmx512m
-XX:PermSize=128m
-XX:MaxPermSize=128m

Tags: ,

3 Responses to “Eclipse – Available Memory is Low”

  1. Open eclipse.app by right clicking and selecting show package contents open eclipse.app/contents/MacOS/eclipse.ini
    Note: take a backup of eclipse.ini
    replace the contents with follwing contents and restart.
    -vmargs
    -Dosgi.splashLocation=/Developer/JavaIDEs/MyEclipse 6.0/eclipse/MyEclipseSplash.bmp
    -showsplash
    org.eclipse.platform
    -Xdock:icon=../Resources/Eclipse.icns
    -XstartOnFirstThread
    -Xms40m
    -Xmx512m
    -XX:MaxPermSize=256m
    -Dosgi.requiredJavaVersion=1.5
    -Dorg.eclipse.swt.internal.carbon.smallFonts

  2. Note:Don’t change the splash location. the above mentioned ini contents are based eclipse installation in my machine..

  3. Open eclipse.app by right clicking and selecting show package contents open eclipse.app/contents/MacOS/eclipse.ini
    Note: take a backup of eclipse.ini and my -Dosgi.splashLocation is based on My Eclipse installation on my machine.
    I modified the eclipse.ini like mentioned below and and it works fine without any errors and crashes.
    -vmargs
    -Dosgi.splashLocation=/Developer/JavaIDEs/MyEclipse 6.0/eclipse/MyEclipseSplash.bmp
    -showsplash
    org.eclipse.platform
    -Xdock:icon=../Resources/Eclipse.icns
    -XstartOnFirstThread
    -Xms40m
    -Xmx512m
    -XX:MaxPermSize=256m
    -Dosgi.requiredJavaVersion=1.5
    -Dorg.eclipse.swt.internal.carbon.smallFonts

Leave a Reply