Resetting memory is much less available memory

I have a Tomcat application server that is configured to generate a memory dump in OOM and starts with -Xmx1024M, so Gigabyte must be available for it.

Now I found one such dump and it only contains 260MB of unallocated memory. How is it possible that the dump is so much smaller than what it should be?

+2


a source to share


2 answers


Permgen space is managed independently of the heap and can run out even when it has a lot of free memory. Some web frameworks (especially JSF) are real sows, and at the same time, it is easy to lose the default configuration. It can be increased with -XX: MaxPermSize = ### m



Remember that system space is limited by the sum of heap and permgen, so you may consume fewer total resources before throwing a Can not Create Native Thread OOM exception, unless you shrink the heap by PermGen.

+2


a source


Only information about the use of the allocated memory will be dumped to the file. A heap dump is not a binary image of your heap, it contains information about data types, etc. And may exceed your available memory.



Text (classic) Heapdump file format

+2


a source







All Articles