Cause

The heap size of Eclipse Memory Analyser Tool is not enough to parse a heap dump file.

Solution

Go to Eclipse MAT home directory and edit
MemoryAnalyzer.ini file. Change
-Xmx parameter value to appropriate one. There are situations in which it’s necessary to set
-Xmx parameter value above the size of parsed heap dump file. i.e. if you try to open 4GB *.hprof and get Java heap space error, you should try to raise Xmx above 4GB:
-Xmx5g