The way page table tree is walked through nowadays requires that the
process map data is incremented every time the page table tree is
processed. Otherwise the last time the tree is processed, the counters
are overwritten with the last values, which is most likely zeros.
Signed-off-by: Timo Kokkonen <kaapeli@itanic.dy.fi>
af.map = map;
count_pages(root, &af);
- map->pages_present = af.pages_present;
- map->pages_swapped = af.pages_swapped;
+ map->pages_present += af.pages_present;
+ map->pages_swapped += af.pages_swapped;
}
biggest = MAX(biggest, map->pages_present + map->pages_swapped);