Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the "paused" values in GC_CONCURRENT log messages?

I'm trying to explore the behavior of the new concurrent garbage collector in GingerBread (2.3).

Could someone please explain these example log lines in details (especially the "paused" parts of GC_CONCURRENT and GC_FOR_MALLOC)?

12-24 10:20:54.912 D/dalvikvm(  414): GC_CONCURRENT freed 510K, 57% free 2529K/5831K, external 716K/1038K, paused 8ms+5ms

12-24 10:20:54.963 D/dalvikvm(  414): GC_FOR_MALLOC freed 510K, 57% free 2529K/5831K, external 716K/1038K, paused 47ms
like image 932
user289463 Avatar asked Dec 24 '10 10:12

user289463


2 Answers

  • GC_CONCURRENT Heap is (almost) full. Therefore concurrent GC kicks in

  • freed 510K - Amount of memory freed

  • 57% free - Memory after freeing %
  • 2529K/5831K - Actual mem in heap
  • external 716K/1038K - Externally allocated memory (memory that is not in dvm)
  • paused 8ms+5ms - time taken for GC

especially the "paused" parts

For concurrent collections there are two pause times. One is at the beginning of the collection and other towards the end. For non-concurrent collection there will be only one pause time.

like image 118
Reno Avatar answered Sep 17 '22 23:09

Reno


if you haven't yet, check out this video: http://www.google.com/events/io/2011/sessions/memory-management-for-android-apps.html

like image 38
EddieH Avatar answered Sep 21 '22 23:09

EddieH