title: Android App Continuously performing heap operations
body: <blockquote>
    <p>11-14 13:18:47.871 14235-14387/com.example.example D/dalvikvm: GC_FOR_ALLOC freed 14121K, 36% free 17900K/27708K, paused 47ms, total 47ms</p>
    
    <p>11-14 13:18:47.871 14235-14387/com.example.example I/dalvikvm-heap: Grow heap (frag case) to 24.392MB for 5785374-byte allocation</p>
  </blockquote>
  
  <p>These two operations are continuously going on in my android app. No other operations are happening. I do not know what code I need to share for this. I am really sorry for that. Please let me know what code to share for this.</p>
  
  <pre><code>private static String uncompressInputStream(InputStream inputStream) throws IOException {
      final int BUFFER_SIZE = 1024;
      String value = "";
      byte buffer[] = new byte[BUFFER_SIZE];
      GZIPInputStream gzipIn = null;
      try {
          gzipIn = new GZIPInputStream(inputStream,BUFFER_SIZE);
          int bytesRead;
          while ((bytesRead = gzipIn.read(buffer)) != -1) {
              value += new String(buffer,0,bytesRead);
          }
      } finally {
          try {
              if (gzipIn != null) {
                  gzipIn.close();
              }
          } catch (IOException io) {
              io.printStackTrace();
          }
      }
      return value;
  }
  </code></pre>