简体   繁体   中英

In android memory monitor, what is the different between `total count` and `heap count`?

In google docs , it said that, heap count means Number of instances in the selected heap,while total count means Total number of instances outstanding.What is the selected heap? Always, the total count is larger than heap count ,so ,where is the other objects besides those in heap?

There are 3 heaps in Android:

  • App
  • Image
  • Zygote

Total Count is the total across all 3 heaps. Heap Count is the number of objects in the current selected heap.

See https://developer.android.com/studio/profile/am-hprof.html

total count include the instance in running stack too. heap count is just in heap size.

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