Java Heap Space OOM on Eclipse MAT — How to fix
I had the hardest time increasing the memory for Eclipse MAT because everyone was pointing to an eclipse.ini file, but that file didn’t exist. Instead, I had to update the MemoryAnalyzer.ini, and not the eclipse.ini file.
I kept receiving an error regarding Java Heap Space, so the JVM was OOM’ing. To fix that, I downloaded the latest version of Eclipse from here:
https://www.eclipse.org/mat/downloads.php
Installed it on my MacOS system. Then I right-clicked the application in the /Applications folder and selected Show Package Contents:
Now, under Eclipse, you should see MemoryAnalyzer.ini:
Open MemoryAnalyzer.ini in a text editor of your choice, and edit the -Xmx parameter:
Restart Eclipse MAT and that should be all there is to it.