It is usually neccessary to increase the amount of memory that the Java virtual machine running Eclipse uses. Eclipse is a memory-intensive application, and the default amount of memory is usually not enough. The available memory is increased by passing parameters to the Eclipse launcher executable.
The eclipse launcher executable (for example, eclipse.exe on Windows) is responsible for launching a JVM process to host Eclipse. The parameters for increasing the available memory differ from JVM to JVM. The instructions given below are valid for Sun's JVMs.
The eclipse launcher executable takes a -vmargs parameter that allows for passing of JVM specific arguments to the JVM process. For example, the following invocation gives the general form of passing a -Xmx argument to the JVM to increase the maximum heap size:
eclipse.exe [normal arguments] -vmargs -Xmx256M
The key is to pass -vmargs followed by the JVM-specific memory setting (usually -Xmx256M, replacing 256M with any size) as the final arguments to the Eclipse launcher.
It's best to run Eclipse with as much memory as you can, but at least 256 MB is recommended.
On windows, the easiest way to change this setting is to edit a shortcut that launches eclipse.exe. The following screenshot illustrates this approach: