简体   繁体   中英

GC_FOR_MALLOC freed N objects

My Logcat is full of many the following messages interleaved with the messages I am interested in:

11-06 18:05:42.129: DEBUG/dalvikvm(853): 
GC_FOR_MALLOC freed 543 objects / 25440 bytes in 46ms

I know how to filter in messages by TAG and/or by PID, but I don't know how to filter out .

My questions:

  1. Is there a way to filter out those GC_FOR_MALLOC messages?
  2. How can those GC_FOR_MALLOC messages be useful for an application program (ie not system) debug?

If you are using Eclipse 3.6.2 and up with the latest ADT 16, then you can use the following Java regex in the by Log Tag field in the filter:

^((?!dalvikvm).)*$

在此输入图像描述

Hope this helps.

Is there a way to filter out those GC_FOR_MALLOC messages?

Like this:

How can those GC_FOR_MALLOC messages be useful for an application program (ie not system) debug?

GC_FOR_MALLOC means that the Garbage Collection started due to lack of memory on the heap to perform an allocation.

And the log says it freed 543 objects or 25440 bytes in 46ms (which is quite long btw). The DVM was paused for 46ms.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM