Where does Ubuntu stores page tables?
Per the kernel Documentation
pagemap is a new (as of 2.6.25) set of interfaces in the kernel that allow userspace programs to examine the page tables and related information by reading files in /proc.
However, when I ran this command when the process 13883 is running on Ubuntu 18.04.4 LTS
ll /proc/13883/pagemap
I got
-r-------- 1 ubuntu ubuntu 0 Dec 20 18:05 /proc/13883/pagemap
which seems to indicate that Ubuntu stores the info somewhere else, if yes, then where is it?
Another interesting observation is that /proc/13883/maps
also appears to be size of zero though, there's actually a table in there.
...
7ffd62dd7000-7ffd62df8000 rw-p 00000000 00:00 0 [stack]
7ffd62df9000-7ffd62dfc000 r--p 00000000 00:00 0 [vvar]
7ffd62dfc000-7ffd62dfe000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
Many "files" in /proc
are merely a file-like interface to kernel APIs, and don't actually exist on disk. Try cat
on those files, and the kernel will generate information on the fly and you'll see output. Since the information is generated when needed, these files don't have a meaningful "size".