简体   繁体   中英

Is GC_FOR_ALLOC different from GC_FOR_MALLOC?

https://developer.android.com/tools/debugging/debugging-memory.html refers to GC_FOR_MALLOC , which I do not see in my log. It does not refer to GC_FOR_ALLOC at all.

I do see GC_FOR_ALLOC :

03-12 10:11:02.382: D/dalvikvm(21382): GC_FOR_ALLOC freed 5383K, 30% free 27403K/39060K, paused 48ms, total 49ms
03-12 10:11:20.912: D/dalvikvm(21382): GC_FOR_ALLOC freed 8100K, 30% free 27392K/39060K, paused 63ms, total 63ms

What is the difference between these two GC events?

GC_FOR_ALLOC is just the new name that is used for GC_FOR_MALLOC on newer versions of Android, so they're the same. Google should really update that documentation :/

I got the answer from here in case you want to check it out: What do GC_FOR_MALLOC, GC_EXPLICIT, and other GC_* mean in Android Logcat?

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