D/dalvikvm: <GC_Reason> <Amount_freed>, <Heap_stats>, <External_memory_stats>, <Pause_time>
The system recycler prints the memory recycle status at intervals. The log Content format is the preceding format. Below is a detailed description
<Reason for recovery> <total amount of memory recycled> <percentage of available memory> <external memory status> <recovery time>
D/dalvikvm( 9050): GC_CONCURRENT freed 2049K, 65% free 3571K/9991K, external 4703K/5261K, paused 2ms+2ms
GC reason GC collection reason (what triggers the collection and what types of collection) contains the following types
-
Gc_concurrent concurrent collection
-
When your program stack reaches the maximum value, the memory is recycled concurrently.
-
Gc_for_malloc is recycled During allocation
-
If your program requests memory but the stack is full, the system will stop your program and reclaim the memory.
-
Gc_hprof_dump_heap when you create an hprof file to analyze the memory stack.
-
Gc_explicit precise release
-
The program explicitly requires memory collection, such as calling GC (it is best to avoid active calling. We should believe that the recycler will automatically recycle the memory when needed)
-
GC_EXTERNAL_ALLOC
-
This happens only on API level 10 and lower (newer versions allocate everything in the Dalvik heap ). A garbage collection for externally allocated memory (such as the pixel data stored in native memory or NiO byte buffers ).
Amount freed
Total recycled memory
Total memory collected by the recycler.
Heap stats
Available memory percentage
Available memory percentage = 100%-used memory/available memory
External memory status
Only devices with an API of 10 or less will have one. Allocated memory/total number of reusable memory
Pause Time
Recycling time
The larger the memory stack, the longer it takes to recycle it. There are two concurrent release times: the start time of collection and the end time.