【发布时间】:2013-03-08 02:36:32
【问题描述】:
首先,我想在此处粘贴一些 Honeycomb 的 GC 日志消息。
03-08 01:31:54.354: D/dalvikvm(258): GC_CONCURRENT freed 196K, 5% free 7078K/7431K, paused 3ms+3ms
03-08 01:31:54.494: D/dalvikvm(258): GC_FOR_ALLOC freed 4K, 5% free 7073K/7431K, paused 75ms
03-08 01:31:54.494: I/dalvikvm-heap(258): Grow heap (frag case) to 7.391MB for 411152-byte allocation
我有 4 个问题。
我在 Google i/o 2011 上观看了视频“Android Memory Management”,但我仍然不清楚 5% 的免费 7078K/7431K。这意味着我们在 7431K 堆大小中使用 7078K,但是 7431K 在这里意味着什么?因为我注意到 7431K 会达到一个很大的数量。这个数字有什么政策吗?如果是总堆大小,应该是 16M 或 32M 之类的。但这里显然没有..
Honeycomb 也有类似
Grow heap (frag case) to 7.391MB for 411152-byte allocation的消息,而 Gingerbread 没有。这是什么意思?Honeycomb 及更高版本中的 GC 日志消息不显示“external xxxK/xxxK”之类的外部内存信息,为什么?
我还注意到,在ICS及以后的版本中,GC日志消息也有类似
GC_FOR_ALLOC freed 190K, 13% free 5409K/6164K, paused 67ms, total 71ms的总时间,但是这里alloc gc的总时间大于暂停时间,有时你会注意到总时间会比暂停时间大得多。为什么?
【问题讨论】:
标签: android garbage-collection android-4.0-ice-cream-sandwich android-3.0-honeycomb android-logcat