title: Android Out of Memory Error - Bitmap is too big
body: <p>In my game, I have a bitmap image which functions as the games background (drawn on a canvas). The bigger the image the more　"space" there is in the game for the user to move in, so I want the bitmap to be as big as possible without causing memory problems.</p>
  
  <p>Well I went overboard and drew an enormous bitmap, which caused an out of memory error immediately on initialzation, so I shrunk the bitmap a bit. But I think its too small. My question is how can I measure the "safe" limit of the memory being used?</p>
  
  <p>I used the following methods and read the output in CatLog:</p>
  
  <pre><code>Debug.getNativeHeapAllocatedSize();
  Log.v("MEMORY",String.valueOf(Debug.getNativeHeapAllocatedSize()) );                    
  Log.v("FreeMEMORY",String.valueOf(Debug.getNativeHeapFreeSize ()) );
  </code></pre>
  
  <p>The results of which were:</p>
  
  <pre><code> 05-25 09:53:54.044: VERBOSE/MEMORY(23044): 9715624
  
   05-25 09:53:54.044: VERBOSE/FreeMEMORY(23044): 61528
  </code></pre>
  
  <p>The free memory seems quite small? Is this cutting close to the bone?</p>