Tuesday, January 20, 2009

available memory is low

If you have used Eclipse as your IDE you have probably seen the 'Available Memory Is Low' error message. The error itself tells you exactly what the problem is and what the recommended memory parameters should be. However, it doesn't tell you where you need to make those changes and how you can verify what your current configuration is.To check your current memory settings on a Mac go to Eclipse -> About Eclipse Platform then click Configuration Details and scroll down just a little and you will be able to see your settings (which may look something like the following).

-Xms40m
-Xmx256m
-XX:MaxPermSize=256m


The location of the file you need to edit is located in your Eclipse installation directory. Right click (or Control-Click) on the Eclipse.app file and select Show Package Contents. Then traverse to Contents -> MacOS and open the eclipse.ini file.It is within the eclipse.ini file where you can update the memory settings as recommended by the error messsage.

-Xms128m
-Xmx512m
-XX:PermSize=64m
-XX:MaxPermSize=256m


Now you just need to restart Eclipse and you can verify your new configuration settings by again accessing Eclipse -> About Eclipse Platform then clicking Configuration Details. Now, you should no longer see the 'Available Memory Is Low' messages.

The image reflections in this post were made at http://www.reflectz.net/ (check it out, it's pretty cool!)

No comments:

Post a Comment