开发者

why would an hprof file have a much smaller size than the amount of memory given to the jvm

开发者 https://www.devze.com 2023-02-25 00:55 出处:网络
Our code runs with -XX:+HeapDumpOnOutOfMemoryError flag 开发者_如何学Cso we get an hprof file on OOM.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号