Seven Pages Of Tables

x86-64 in its usual configuration translates a 48-bit virtual address with 4 KiB pages and 8-byte page table entries. Every table at every level is exactly one page.

A 48-bit virtual address split into four 9-bit indices and a 12-bit offset 47:39 38:30 29:21 20:12 11:0 level 4 idx level 3 idx level 2 idx level 1 idx page offset 9 bits 9 bits 9 bits 9 bits 12 bits

A process has just started and has touched exactly two pages: one code page near the bottom of the address space and one stack page near the top, far enough apart that they fall under different level-4 entries.

How much physical memory do this process's page tables occupy?

A

512 GiB

B

28 KiB

C

16 KiB

D

8 KiB