| Down vote |
I was also looking for this information. GC stands for garbage-collector, which collects unused objects during runtime of your app.
-
- Gc_external_alloc: Means that the VM is trying to reduce the amount of memory used collectable objects, to make room for non-collectable objects.
- Gc_for_malloc: Means that the GC was triggered because there wasn't enough memory left on the heap to perform an allocation. Might be triggered when new objects are being created.
- Gc_concurrent: Triggered when the heap has reached a certain amount of objects to collect.
- I am guessing that the 38% free means that 38% of the heap is unused. 8772 K wocould be the size of the used memory on the heap and 14087 K wocould be the size of the heap.
- I don't know, sorry.
Please note that all of this information is based on a post from Robert on a similiar question posted Here on stackoverflow. All credit (as long as this is correct) goes to Robert. |
Another place where the Dalvik Garbage Collector messages are explained is in this video: Google I/O 2011: Memory Management for Android apps
At about 14 minutes into the presentation, he breaks down the message format. (BTW, that video has really good info on debugging memory leaks)
Roughly speaking, the format is[Reason] [Amount Freed], [Heap Statistics], [External Memory Statistics], [Pause Time]
Reason
Viktor/Robert already explainedGC_CONCURRENT,GC_FOR_MALLOC,GC_EXTERNAL_ALLOC.
There is also:
Amount freed
E. g.freed 2125K
Self explanatory
Heap statistics
E. g.47% free 6214K/11719K
These numbers reflect conditions after the GC ran. the "47% free" and 6214 K reflect the current heap usage. the 11719 K represents the total heap size. from what I can tell, the heap can grow/shrink, so you will not necessarily have an outofmemoryerror if
You hit this limit.
External memory statistics
E. gexternal 7142K/8400K
Note: This might only exist in pre-honeycomb versions of Android (pre 3.0 ).
Before honeycomb, bitmaps are allocated external to your VM (e.g. bitmap. createbitmap () allocates the bitmap externally and only allocates a few dozen bytes on your local heap ). other examples of external allocations are for Java. NIO. bytebuffers.
Pause Time
If it's a concurrent GC event, there will be two times listed. one is for a pause before the GC, one is for a pause when the GC is mostly done. e. g.paused 3ms+5ms
For non-concurrent GC events, there is only one pause time and it's typically much bigger. E. g.paused 87ms