I am running a web application with WildFly 9
and I've allocated X GB
of memory. Over a period of time the memory gets accumulated and I run the jmap
utility to collect the heap dump for analysing the memory utilization.
When I do this, the memory consumed by the java.exe
comes down from X
to X-Y GB
. Sometimes the Y
amounts to GBs
of memory.
Why does this happen? If this chunk of memory is marked to be cleared, why doesn't GC clear it?