SOS: Upcoming release has a few new commands – HeapStat

There are a lot of times where all you want to see are the sizes of the various heaps and generations.  For the heaps, you can use !eeheap -gc to see the sizes, but the output can be a little difficult to read as it prints out so much other stuff.

So this is where !heapstat can help out.  This will print out the size of each heap, broken down by generation (including the large object heap).  It will also show you the free space (reserved) for each one also.  You can add the -inclUnrooted switch to see unrooted objects also.  Here is the output:

 heapstat

The percentage column contains a breakout of free/unrooted bytes to total bytes.