Reputation: 25156
Does the following graph indicate that I am using memory and it is not being garbage collected?
I expected the orange graph (the allocated heap) to go down once I start using less of the heap.
Upvotes: 7
Views: 650
Reputation: 500923
It is clear from the graph that your JVM is capable of shrinking the heap. This can be seen from the orange line taking a slight dip just before 3:10pm.
However, later on the JVM chooses to not shrink the heap. This is almost certainly because an insufficiently large fraction of the heap is unused. The behaviour is controlled by -XX:MinHeapFreeRatio
and -XX:MaxHeapFreeRatio
.
For a discussion, see http://stopcoding.wordpress.com/2010/04/12/more-on-the-incredible-shrinking-jvm-heap/
Upvotes: 10