Large scale projects issues

Here you can get answers to frequently asked questions!

Large scale projects issues

Postby Moderator » 12 Nov 2007, 16:34

PROBLEMS WITH MEMORY THAT IS ERROR 'Java heap space (java.lang.OutOfMemoryError)'

Conventionally when being run, Eclipse assigns a heap of 256MB to a Java virtual machine. In case the workspace contains large resources (their total size is over e.g. 1GB) after a longer work with MDT, the virtual machine may report our of memory error.

In case of large projects Eclipse Help suggests enlarging Java virtual machine heap do e.g. 512MB. It can be performed in two ways, and in both cases it is done by changing the following parameters:

  • -Xms – decides about the initial heap size assigned to Java virtual machine (by default 40MB). If the heap appears to be too small in some moment, the virtual machine will be assigning a larger heap to itself till it reaches the size defined by -Xmx parameter.
  • -Xmx – decides about the maximum heap size assigned to Java virtual machine (by default 256MB)
The -Xms and -Xmx parameters can be set to the same value which eliminates the need for heap enlargement. The -Xms value cannot be larger than -Xmx value because the MDT will not run then. In case -Xmx exceeds the physical size of available RAM memory the Java virtual machine can start using the virtual memory which is non-effective.

The -Xms and -Xmx values can be defined:

  • In configuration file eclipse.ini. This file is placed in the same folder as eclipse.exe. Default content of the file is:

    -vmargs
    -Xms40m
    -Xmx256m

    Please note that each parameter in the file is placed in a separate line.
  • As launching parameters of eclipse.exe executable. For example:
    eclipse.exe -vmargs -Xms128m -Xmx512m
In both cases -vmargs parameter cannot be forgotten as it divides eclipse.exe and Java virtual machine parameters. Because of that -vmargs parameter and the following parameters after it need to be placed always at the end.

PROBLEMS WITH LONG WORKSPACE REFRESHING DURING EVERY STARTUP

By default Eclipse refreshes all of the workspace resources during every startup. If user has linked core product folders (or any other large folders) to Magik projects then the refresh process may take a long time.
In order to omit that issue uncheck Refresh workspace on startup option in workspace preferences (Window->Preferences...->General->Startup and Shutdown).
Moderator
 
Posts: 59
Joined: 11 May 2006, 11:19

Return to FAQ

Who is online

Users browsing this forum: No registered users and 0 guests

cron