In the run configuration you want to customize (just click on it) open the tab Arguments
and add -Xmx2048m
in the VM arguments section.
You might want to set the -Xms
as well (small heap size).
Find the Run button present on the top of the Eclipse, then select Run Configuration -> Arguments, in VM arguments section just mention the heap size you want to extend as below:
-Xmx1024m
Open it in word or any file editor for edit
...
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
...
Replace -Xmx512m to -Xmx1024m
Open eclipse.ini
Search for -Xmx512m
or maybe more size it is.
Just change it to a required size such as I changed it to -Xmx1024m
In Eclipse Folder there is eclipse.ini file. Increase size -Xms512m
-Xmx1024m
Source: Stackoverflow.com