Specifying the Heap Size
Eclipse requires large memory space for some operations and it is recommended to increase the amount of memory that Eclipse is allowed to allocate. You can increase the amount of memory by adding two flags in the shortcut to Eclipse.
Use the following flags to set the maximum heap size to YYY megabytes:
-
-vmargs
-
-XmxYYYM
For example, C:\Eclipse\eclipse.exe -showlocation -vmargs -Xmx384M
means that the heap size is set to 384 MB.
The maximum size to choose depends on the amount of physical memory available and the number of concurrent applications that are running. Eclipse will display multiple memory errors if the heap size is less. Experimenting with different settings is necessary to get the best result for the current hardware or software configuration.
The following table lists the rough estimates of how the workspace size could be allocated for different types of Eclipse or M3 Adaptation Kit (MAK) projects. In the table, X is the recommended heap size depending on the machine and (X) is the allocated heap size only necessary in rare cases.
Project Type | 256 MB | 384 MB | 512 MB | 768 MB |
Simple | X | X | (X) | |
Java | X | X | (X) |
A Java project usually allocates more memory from the system than a Simple project.