title: How to analyze golang memory?
body: <p>I wrote a golang program, that uses 1.2GB of memory at runtime.</p>
  
  <p>Calling <code>go tool pprof http://10.10.58.118:8601/debug/pprof/heap</code> results in a dump with only 323.4MB heap usage. </p>
  
  <ul>
  <li>What's about the rest of the memory usage?</li>
  <li>Is there any better tool to explain golang runtime memory?</li>
  </ul>
  
  <hr>
  
  <p>Using <code>gcvis</code> I get this: </p>
  
  <p><img src="https://i.stack.imgur.com/xiSQu.png" alt="enter image description here"></p>
  
  <p>.. and this heap form profile:</p>
  
  <p><img src="https://i.stack.imgur.com/H45IP.jpg" alt="enter image description here"></p>
  
  <p>Here is my code: <a href="https://github.com/sharewind/push-server/blob/v3/broker" rel="noreferrer">https://github.com/sharewind/push-server/blob/v3/broker</a></p>