title: Measure (Android) heap fragmentation?
body: <p>We have an app with lots of bitmaps in memory. It keeps failing with </p>
  
  <pre><code>java.lang.OutOfMemoryError: bitmap size exceeds VM budget
  </code></pre>
  
  <p>errors. It's possible that we are genuinely using too much memory; it's possible that we are leaking memory; it's also possible that we aren't doing anything wrong, and heap fragmentation is what's killing us. (Since Android's garbage collector doesn't relocate live blocks, we could have megabytes free and be unable to allocate 50K.)</p>
  
  <p>Is there any way to rule out fragmentation? I've looked for something like maxAvail/memAvail, but haven't spotted anything apposite.</p>