title: How to analyze memory usage of an app
body: <p>I try to debug an Android application which has an out of memory error. The
  app cannot allocate 3Mbytes in some condition. I analyze the adb log,
  there are some debug output of dalvikvm as below:</p>
  
  <pre><code>dalvikvm: GC_FOR_MALLOC freed &lt;1K, 47% free 4781K/8967K, external 55469K/57517K, paused 64ms
  dalvikvm: GC_EXTERNAL_ALLOC freed &lt;1K, 47% free 4781K/8967K, external 55469K/57517K, paused 80ms
  dalvikvm: GC_FOR_MALLOC freed 0K, 47% free 4781K/8967K, external 55469K/57517K, paused 39ms
  </code></pre>
  
  <p>I compare the number in above output with the number in "Heap" window
  of DDMS. "free 4781K/8967K" seems corresponding to "Allocated" and
  "Heap size" in "Heap" of DDMS. However, I'm not sure what is "external
  55469K/57517K". I suspect that it is memory allocated by native code.
  Does anybody know this?</p>