For a simple app I am writing, logcat spams lots of GC_FOR_MALLOC
messages like these:
D/dalvikvm(10236): GC_FOR_MALLOC freed 224K, 51% free 3290K/6599K, external 0K/0K, paused 21ms
D/dalvikvm(10236): GC_FOR_MALLOC freed 290K, 50% free 3323K/6599K, external 0K/0K, paused 33ms
D/dalvikvm(10236): GC_FOR_MALLOC freed 229K, 50% free 3325K/6599K, external 0K/0K, paused 24ms
The app does not much, only loads two HTML documents via https using Apache HttpClient 4.X. I already defined android:largeHeap="true"
, but it is not helping.
From the message I read that I have 50% memory free, but the GC is forced to run anyway. Do you know why this occurs, and how this can be fixed? Thanks.