1

How can I have the sequence of pages referenced by a program using Valgrid or any other tool? I don't want the total count of hits or misses but the exact list of page numbers ordered by access. I want to use this sequence as the input of a simulated memory management algorithm. Thanks

behrang M
  • 11
  • 1

1 Answers1

0

I'm not aware how to do it on other operating systems, but on linux you can get PFNs from /proc/PID/pagemap:

The /proc/pid/pagemap gives the PFN, which can be used to find the pageflags using /proc/kpageflags and number of times a page is mapped using /proc/kpagecount. For detailed explanation, see Documentation/vm/pagemap.txt.

Dan Kruchinin
  • 2,945
  • 1
  • 17
  • 21