**** Advance Notice ****

This site will be closed on 31 December 2015,

Important Information for users of NXP LPCXpresso

This site is for users of Code Red branded products.

NXP LPCXpresso users should visit the LPCXpresso FAQ's for up-to-date information relevant to that product.

Increasing the memory available to Java

The Code Red IDE is a Java application. While running the IDE, Java may report various errors that are related to the amount of memory available to the Java runtime. You may find these errors listed in the log file (<workspace>/.metadata/.log) The errors are typically caused by having additional plugins installed into the IDE or by having a large number of projects and/or files in your workspace.

This FAQ shows how to increase the amount of Java memory available for each error type.

The INI file

When the IDE starts, it loads Java configuration information from the ini file. The locations and name of this file depends on the IDE being run:

Java PermGen space (Out of Memory errors)

If you see java.lang.OutOfMemoryError: PermGen space errors, you need to increase the permanent generation (PermGen) space available to Eclipse.

To increase the PermGen size, edit the ini file, and add/edit the following line AFTER the -vmargs argument :

-XX:MaxPermSize=128M

Notes:

  1. If your IDE is already using these (or higher) settings, you can simply increase the sizes.

Java Heap Space (Heap errors)

If the Code Red IDE starts reporting "Java Heap errors", or the IDE is frequently hourglassing, you will need to increase the Java Heap size.

To increase the Java heap size, edit the ini file, and add/edit the following lines (it is important that they are on separate lines}:

-vmargs
-Xms128m
-Xmx256m

Notes:

  1. If your IDE is already using these (or higher) settings, you can simply increase the sizes.
  2. The value for -Xmx must always be greater than or equal to the value for -Xms. Thus if you use -Xms512m, you must also set -Xmx512m.

After making these changes, you will need to close the IDE and restart.

You may also wish to enable the workspace preference such that the Java heap status is displayed in the IDE status bar (bottom right of Window). To do this, select:

Window -> Preferences -> General -> Show heap status

More information

Description of the arguments:

A full discussion on the options available in the file can be found here: http://wiki.eclipse.org/Eclipse.ini

JavaHeapSize (last edited 2012-04-19 08:23:33 by DerekMorris)