Eclipse OutOfMemoryError Fix
We can increase eclipse memory by providing more Permgen space and heap memory for Eclipse to use. These settings are usually configured in the eclipse.ini file. You can check the location of the eclipse.ini file from below images for Mac OS X.
In windows, you will find the eclipse.ini file in the same directory as the eclipse.exe file.
Once you have located the eclipse.ini file, just open it in your favorite text editor.
Increase Eclipse Heap Space
You can increase the maximum heap size by editing -Xmx value. For example, below snippet will increase the eclipse heap size to 2 GB.
1 2 3 4 |
-Xmx2048m <img class="alignnone wp-image-32933 size-full" src="https://all-learning.com/wp-content/uploads/2016/06/increase-eclipse-memory-size.png" alt="increase-eclipse-memory-size-windows" width="1200" height="628" /> |
Increase Permgen Space in Eclipse
If you are using below Java 8, then you might get OutOfMemoryError: Permgen space, just increase the permanent generation space available to Eclipse. Below is the configuration to increase permgen space to 512 MB in eclipse.ini file.
1 2 3 |
-XX:MaxPermSize=512M |