title: Jmap heap dump, does it include young generation?
body: <h2>Quick question</h2>
  
  <p><strong>Does the jmap heap dump include only the old generation, or also the young generation ?</strong></p>
  
  <hr>
  
  <h2>Long explanation</h2>
  
  <p>I have 2 heap dump (<code>jmap -heap:format=b 9999</code>) :</p>
  
  <ul>
  <li>one of my server with no load (no HTTP request)</li>
  <li>one while working 50% CPU, a high load (benchmarking)</li>
  </ul>
  
  <p>Now, the <strong>first dump</strong> shows a <strong>heap size bigger than the second</strong> (which I thought was weird).</p>
  
  <p>Could that be because the Young generation (at high load) is changing often because the Garbage collector is running often (yes, the JVM is almost full) ? Old generation is full at 99%, I've noticed the young generation space usage vary a lot.</p>
  
  <p>So that would mean that I made the second dump right after the GC did his job, this is why its size is smaller. Am I right ?</p>
  
  <p><strong>Additionnal informations</strong> :</p>
  
  <p>Java args :</p>
  
  <pre><code>-XX:+UseParallelGC -XX:+AggressiveHeap
  -Xms2048m -Xmx4096m -XX:NewSize=64m
  -XX:PermSize=64m -XX:MaxPermSize=512m
  </code></pre>