srf
srf

Reputation: 2450

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 (i.e. not system) debug?

Upvotes: 1

Views: 1355

Answers (2)

Bill The Ape
Bill The Ape

Reputation: 3306

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).)*$

enter image description here

Hope this helps.

Upvotes: 3

Reno
Reno

Reputation: 33792

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 (i.e. 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.

Upvotes: 1

Related Questions