why would an hprof file have a much smaller size than the amount of memory given to the jvm
Our code runs with -XX:+HeapDumpOnOutOfMemoryError flag 开发者_如何学Cso we get an hprof file on OOM. Recently I got such a file from an installation, I opened it with Eclipse memory analyzer (MAT) and I can see the total size is 46MB, how can it be if the process was started with -Xmx1024m???
Should not the size be much much closer to the max allocated size??
This is with jdk1.6.
EDIT: ok now I found a similar question and indeed a PermGen space issue could be the reason, as my process has been up for 23 days. I create new threads (that end properly as far as I know) very often, once per second maybe. Anybody knows if I could confirm this somehow?
This would happen if you failed to create a very large object. i.e. the object which you failed to create is not in the dump.
精彩评论