Some say I need to do that in Run Configurations for my application. When I open that window, could you please tell me how to set the right argument and the amount of memory? Say how to set 2GB or 1.5GB?
- 
                    1See also http://stackoverflow.com/questions/14382932/increase-jvm-max-heap-size-eclipse – Paul Verest Mar 13 '15 at 04:34
5 Answers
In the run configuration you want to customize (just click on it) open the tab Arguments and add -Xmx2048min the VM arguments section.
You might want to set the -Xms as well (small heap size). 
 
    
    - 10,635
- 5
- 42
- 50
- Go to Eclipse Folder 
- Find Eclipse Icon in Eclipse Folder 
- Right Click on it you will get option "Show Package Content" 
- Contents folder will open on screen 
- If you are on Mac then you'll find "MacOS" 
- Open MacOS folder you'll find eclipse.ini file 
- Open it in word or any file editor for edit - ... - -XX:MaxPermSize=256m -Xms40m -Xmx512m- ... 
- Replace -Xms512m to -Xmx1024m 
- Save the file and restart your Eclipse 
- Have a Nice time :) 
 
    
    - 2,535
- 5
- 16
- 23
 
    
    - 3,946
- 39
- 35
- 
                    6
- 
                    1This will increase the heap size for all of Eclipse, not just the target application. – ThisClark Mar 25 '18 at 06:28
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
 
    
    - 10,461
- 10
- 47
- 63
 
    
    - 341
- 5
- 19
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 
 
    
    - 3,833
- 3
- 13
- 32
 
    
    - 141
- 1
- 4
 
     
    