Browsing articles in "Eclipse"
Jul
24

Allocating enough memory and solving OutOfMemoryErrors

By default, Eclipse will allocate up to 256 megabytes of Java heap memory. This should be ample for all typical development tasks. However, depending on the JRE that you are running, the number of additional plug-ins you are using, and the number of files you will be working with, you could conceivably have to increase this amount. Eclipse allows you to pass arguments directly to the Java VM using the -vmargs command line argument, which must follow all other Eclipse specific arguments. Thus, to increase the available heap memory, you would typically use:

eclipse -vmargs -Xmxyour-memory-size

with the your-memory-size value set to greater than “256M” (256 megabytes — the default).

When using a Sun VM, you may also need to increase the size of the permanent generation memory. The default maximum is 64 megabytes, but more may be needed depending on your plug-in configuration and use. The maximum permanent generation size is increased using the -XX:MaxPermSize=your-memory-size argument:

eclipse -vmargs -XX:MaxPermSize=your-memory-size

This argument may not be available for all VM versions and platforms; consult your VM documentation for more details.

Note that setting memory sizes to be larger than the amount of available physical memory on your machine will cause Java to “thrash” as it copies objects back and forth to virtual memory, which will severely degrade your performance.

You can also add this entry to eclipse.ini file:

1
2
3
4
5
6
7
-showsplash
org.eclipse.platform
-vmargs
-Xms512m
-Xmx512m
-XX:PermSize=256m
-XX:MaxPermSize=256m
Jan
2

Eclipse PDT content assist

For ZDE likes’ code assist in Eclipse PDT find file:

.metadata / .plugins / org.eclipse.core.runtime / .settings / org.eclipse.php.ui.prefs

At this file add entry:

contentAssistAutoactivationTriggersPHP=abcdefghijklmnoprstuwyxz:>_$