When I run "adb shell dumpsys meminfo" on android 4.2, I get the result like
Shared Private Heap Heap Heap Pss Dirty Dirty Size Alloc Free ------ ------ ------ ------ ------ ------ Native 28 8 28 16404 12256 3663 Dalvik 14062 10060 13736 20032 15254 4778 Cursor 0 0 0 Ashmem 0 0 0 Other dev 4762 9556 0 .so mmap 11699 1824 1500 .jar mmap 0 0 0 .apk mmap 368 0 0 .ttf mmap 811 0 0 .dex mmap 3736 0 0 Other mmap 114 16 32 Unknown 12064 544 12052 TOTAL 47644 22008 27348 36436 27510 8441
I have read the page of How do I discover memory usage of my application in Android?, but still have several questions:
- Why the native Pss, shared dirty private dirty is very small?
- the heap size should be smaller than Pss?
- What does Unknown mean? Seems very big.
- If I want to know how much memory my app uses, which data should I use? The Total Pss? But it doesn't include the native Pss which is nealy zero?