4
votes

I have installed MAT in eclipse and also the plugin to open IBM format heap dumps.
When I try to open a heapdump with File->Open from eclipse I get a message box error saying:

An internal error occurred during: "Parsing heap dump from 'C:\UserData\heapdump.44124802.212242.6876.0003.phd'". Java heap space

I assumed that this is due to the max heap size in eclipse. Currently the eclipse.ini is as follows:

-startup plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222

-product org.eclipse.epp.package.jee.product
--launcher.defaultAction openFile
--launcher.XXMaxPermSize 256M
-showsplash org.eclipse.platform
--launcher.XXMaxPermSize 256m
--launcher.defaultAction openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

If I change the memory section as follows:

-Xms40m
-Xmx1024m

Then eclipse does not even start:

Failed to create Java Virtual Machine

What is the problem here?

2
what's the RAM on the machine?Nishant
can you try removing this line --launcher.XXMaxPermSize 256m both the lines or just leave --launcher.XXMaxPermSize without 256mNishant
This is usually due to not enough memory on the machine. Also note that on Windows XP which is 32-bit, the VM can only use close to about 2GB of RAM and that is including the heap, perm gen space, DLL loading, etc. Try this on a 64-bit machine with more RAM, if you can.Strelok
@Strelok:The file is only 300MB.Why is 2GB RAM too small for this?Jim
@Jim Well, not 2GB. In your case 512MB is not enough. 2GB might very well be enough, but it seems your machine cannot even allocate 1GB because you probably do not have enough memory available..Strelok

2 Answers

0
votes

Experiment with Xms Xmx values on the command line with java -version. If those values you specified work there, I suspect the PermGen value needs to be adjusted somehow. If not, you may just not have the memory available on your system.

0
votes

Java requires continuous memory for the heap space. Windows in particular tends to have a limited continuous region of memory available (which is smaller if other programs are running)

Also, a general recommendation: Set -Dosgi.requiredJavaVersion=1.6, not 1.5.

Take a look of these links..

1. Java maximum memory
2. Why is the maximum size of the Java heap fixed?