问题
There are many questions asked regarding output of the "adb shell dumpsys meminfo" like this one: adb shell dumpsys meminfo - What is the meaning of each cell of its output? And now we have this nice article describing types of memory allocations: https://developer.android.com/tools/debugging/debugging-memory.html
And yet, there is no mentioning of "Swapped Dirty" type of memory allocation. What is this beast? AFAIK, Android does not swap dirty pages and yet sometimes I'll get non zero value in that column:
Pss Private Private Swapped Heap Heap Heap
Total Dirty Clean Dirty Size Alloc Free
------ ------ ------ ------ ------ ------ ------
Native Heap 3861 3844 0 2024 7128 6801 326
Dalvik Heap 7073 6996 0 5408 45111 31778 13333
回答1:
Some Android devices do use swap, but they swap to RAM rather than flash. Linux has a feature called ZRAM that compressed pages and then swaps them to a special RAM area, and decompresses them again when needed.
So the pages listed in "Swapped Dirty" are likely in ZRAM.
来源:https://stackoverflow.com/questions/30872464/android-dumpsys-meminfo-swapped-dirty-coloumn-meaning