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:
dalvikvm: GC_FOR_MALLOC freed <1K, 47% free 4781K/8967K, external 55469K/57517K, paused 64ms
dalvikvm: GC_EXTERNAL_ALLOC freed <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
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?