struct bintree_ops ops;
long int pages_present;
long int pages_swapped;
- long int pages_unused;
int pid;
};
}
get_stats:
- if (pf->page_present) {
+ if (pf->page_present)
af->pages_present++;
- } else if (pf->page_swapped) {
+ else if (pf->page_swapped)
af->pages_swapped++;
- } else {
- af->pages_unused++;
- }
}
/*
count = bintree_walk(&pf->tree, &af.ops);
printf("present pages: %ld, %lld %sB\n"
"Swapped pages: %ld, %lld %sB\n"
- "Unused pages: %ld, %lld %sB\n"
"Total %ld physical pages, %lld %sB\n",
af.pages_present,
PAGE_TO_NICE(af.pages_present),
af.pages_swapped,
PAGE_TO_NICE(af.pages_swapped),
PAGE_TO_NICE_UNIT(af.pages_swapped),
- af.pages_unused,
- PAGE_TO_NICE(af.pages_unused),
- PAGE_TO_NICE_UNIT(af.pages_unused),
count,
PAGE_TO_NICE(count),
PAGE_TO_NICE_UNIT(count));