Recently i have read that page table is a per process entity, i was thinking is it possible to view page table for a particular process on a Linux machine ? I have read that there is a reference to page table in some register?
Asked
Active
Viewed 127 times
0
-
1Not the page table per se, but you can look at /proc/N/maps to see the memory map per process. – Jonathon Reinhart Apr 03 '14 at 05:03
-
Also I think newer kernels have another entry somewhere in /proc that allows you to essentially dump the entire page table hierarchy. – Jonathon Reinhart Apr 03 '14 at 05:03
-
I think my previous post on similar topic would be useful, http://stackoverflow.com/a/22595819/2724703 – Mantosh Kumar Apr 03 '14 at 05:18
-
Read this for more details on exactly what a "page" means - and doesn't mean - for Linux memory management: http://www.makelinux.net/ldd3/chp-15-sect-1 – FoggyDay Apr 19 '14 at 15:06
1 Answers
0
On x86, there exists the cr3 register which points to the page tables for your process. You can't access this outside of ring-0, though, so you have to rely on something like /proc/self/pagemap to find out about the page tables.
If you just want to see what's mapped where in your process, then look at /proc/self/maps. If you really want to know about the underlying physical frames, look at /proc/self/pagemap.
Here's some more detailed information about the pagemap file: https://www.kernel.org/doc/Documentation/vm/pagemap.txt

jack_rabbit
- 96
- 4