acid: add some debugging aid function for counting kernel image cache page refs

This commit is contained in:
cinap_lenrek 2014-02-24 22:45:38 +01:00
parent c29719ce84
commit 5e353e17c6

View file

@ -28,6 +28,21 @@ defn path(p) {
// print Image cache contents
IHASHSIZE = 64;
defn imagepagerefs(i) {
local p, n;
n = 0;
p = palloc.$tail;
while p != 0 && p.image != 0 do {
if p.image == i then {
n = n + 1;
}
p = p.prev;
}
return n;
}
defn imagecacheline(h) {
local d, p, q;