title: Several Full GCs, heap size reached XmX which is 1.2g but heap dump shows data only for 200m
body: <p>We noticed frequent Full GC entries in the GC log(for more than 3-4 hrs). Our XmX was 1.2g and all full GC's didn't recover much. VM stayed at around 1 g.</p>
  
  <p>To see what is held in the heap, we took the heap dump but in Memory Analyzer Tool, we see only 30% occupied and remaining 70% free.</p>
  
  <p>Heap file size is 1g though.</p>
  
  <p>we used :live option to take the heap dump.</p>
  
  <pre><code>/usr/&lt;java_version&gt;/bin/jmap -dump:live,format=b,file=heap.bin &lt;pid&gt;
  </code></pre>
  
  <p>Is there any other way to get the complete snapshot of heap?</p>