you may reduce your application memory limit, and then again take a dump. eclipse memory analyser puts dump file to memory - i suspect that your eclipse has less memory than the limit of application.

you can also do the opposite and increase the memory limit for eclipse, but if your application works on a server, it will be hard to match in size of memory.


an internal error has occurred. java heap space

ans: go to your project work space open .setting folder delete all file of .setting folder. after you can compile now there is no error like heap space enjoy :)


i tried all the solutions here as well, while still getting the same error and the reason eclipse was trying to open the .hprof file as a text file due to wrong or unknown file type / editor association.

solution: right click on the file, select open with, then select others, and select eclipse memory analyzer.

worked with 700mb dump, and worked with 2g dump on an eclipse heap of about 600m.


if you are using mac, try running the executable inside the 'folder' with -data option, by which you can specify a writable path:

./memoryanalyzer -data <writable_path>


for my experience add in memoryanalyzer.ini, xms and xmx to the max as your materiel possibilities. g1gc is faster and -xx:-usegcoverheadlimit is need because gc usage can be high and time consuming, and maybe -xx:+usestringdeduplication is the key to consume less memory



if memory analyser is used from eclipse, then edit your eclipse.ini file to increase the vm argument to -xmx1024m or higher. this worked for me.


as suggested by others, its two step simple process:-

  1. open the memoryanalyzer.ini file from your mat installation directory.

  2. change the default -xmx1024m to a larger size for e.g. if you have to analyze a 4gb heap dump then you can replace -xmx1024m with -xmx5g or -xmx6g

for more details refer:-


on os x 11.5 (el cap) modifying does not work! this is because it's looking for the memoryanalyzer.ini in a different place.

on my computer, it was looking for: but the real .ini file was:

in order for your changes to take effect, copy the existing .ini file into the new location.

to find where memoryanalyzer is looking for the ini file, you can run:

sudo su
dtruss ./memoryanalyzer 2>&1 | grep ini


solution for same issue for memory analyzer plugin in eclipse in mac os x el capitan.

i was facing the same issue but with the eclipse plugin and i did not have any memory analyzer app in applications folder. the solution which worked for me was:

  1. right click on eclipse icon and select show package content.
  2. go to contents>eclipse
  3. open eclipse.ini
  4. change value -xmx1024m to -xmx2048m
  5. restart eclipse


note that on os x, to increase the memory allocated to mat, you need to right-click and show the package contents. the memoryanalyzer.ini file is under /contents/eclipse.


the problem is that eclipse memory analyser does not have enough heap space to open the heap dump file.

you can solve the problem as follows:

  1. open the memoryanalyzer.ini file

  2. change the default -xmx1024m to a larger size

Related Query

More Query from same tag