On my system, they are mainly called ION (which replaces pmem). If debug ion is enabled in your kernel, you can calculate the use of ION with this script:
adb shell cat /d/ion/heaps/system|perl -ne 'chomp; if (m/pages in.*pool = (\d+) total/) {$x += $1;} if (m/^\s+total\s+(\d+)$/) {$y += $1} END {printf "use: %d kb, cache: %d kb; total: %d kb", $y/1024, $x/1024, ($x + $y)/1024}'
, , , , .
, , .awk script (dmsys meminfo meminfo , , ), ION:
BEGIN {
types["MemTotal"] = 1;
types["Pss"] = 1;
types["MemFree"] = 1;
types["Cached"] = 1;
types["Buffers"] = 1;
types["Shmem"] = 1;
types["Slab"] = 1;
}
/Pss: / {
hash["Pss"] += $2;
next
}
/MemTotal: / {
hash["MemTotal"] += $2;
next
}
/MemFree: / {
hash["MemFree"] += $2;
next
}
/Cached: / {
hash["Cached"] += $2;
next
}
/Buffers: / {
hash["Buffers"] += $2;
next
}
/Shmem: / {
hash["Shmem"] += $2;
next
}
/Slab: / {
hash["Slab"] += $2;
next
}
END {
lost = 0;
for (type in types) {
if (type == "MemTotal") {
lost += hash[type];
} else {
lost -= hash[type];
}
}
print "lost: " lost " kB\n";
}
, adb shell sh -c 'echo 3 > /proc/sys/vm/drop_caches', .