15/07/2009

Increasing Eclipse memory in Windows and Mac

This is something I have to look for every now and then, so I decided to post it here to make my live easier:

WINDOWS

This are the parameters we have to use:
-vmargs -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128m

We have two options:
  1. Modify the file eclipse.ini available on the Eclipse instalation root
  2. Modify a direct access to eclipse (right click/properties). In this case it should look something like this: C:\eclipse\eclipse.exe -vmargs -Xms512m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=128
MAC

We have to modify eclipse.ini to add the same values as in Windows. To find this file we have to go to the app file (Eclipse.app), right click on it and select "Show package content". We will get a new finder window with a folder named "Contents", we have to navigate to "Contents/MacOS" and we will find "eclipse.ini" in there, you have to edit this file and add the parameters in there.

This is how the file looks on my 4Gb MacBookPro:

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


I hope it helps ;)

UPDATE

Thanks to Brooks we have a screencast explaining how to do this:

http://www.brooksandrus.com/blog/2006/11/23/setting-eclipse-and-java-application-jvm-heap-size-on-mac-os-x/

3 comments:

  1. I made a screencast illustrating exactly how to do this a couple years back:

    http://www.brooksandrus.com/blog/2006/11/23/setting-eclipse-and-java-application-jvm-heap-size-on-mac-os-x/

    ReplyDelete
  2. Hi Brooks, thanks for the link! I´ll update my entry to incude a link to your screencast ;)

    ReplyDelete
  3. A strong memory depends on the health and vitality of your brain. Whether you're a student studying for final exams, a working professional interested in doing all you can to stay mentally sharp, or a senior looking to preserve and enhance your grey matter as you age, there are lots of things you can do to improve your memory and mental performance. memory improvement tips

    ReplyDelete