Linux memory layout

Your RAM in Linux is built upon the following abstractions:

  • Each CPU (multi-core or not) is associated to their own Nodes#, ex: Node 0.

    • Each node is made up of Zones#, ex: DMA, DMA32, Normal.

      • Each zone contains a set number of Pages#, usually at the size of 4096 bytes.

        • Each page can have a Page mapping#, ex: anonymous, file-backed, device-backed.

The Linux kernel can alter how file-backed and anonymous mapped pages are stored by moving them back and forth between RAM and disk. This is referred to as “swapping”. Read How Linux uses swap#

References