Memory

How NUMA Works: Nodes, Distance, and Why First-Touch Allocation Matters

A process that calls malloc for a multi-gigabyte buffer on a two-socket server does not receive equal-cost memory. The physical frames behin...

Sarthak Bystander 18 Oct, 2026

How the Linux Buddy and SLUB Allocators Work: Orders, Partial Slabs, and Why malloc Is Not a Page Fault

A driver that calls kmalloc(256, GFP_ATOMIC) from an interrupt handler and a process that calls malloc(256) are not talking to the same al...

Sarthak Bystander 5 Oct, 2026

How fork and Copy-on-Write Work: Page Tables, Shared Pages, and Why the Child Is Not Free

A prefork server that looked cheap in RSS before the first request can double its memory after workers start handling traffic. fork did not...

Sarthak Bystander 2 Oct, 2026

How mmap Works: File-Backed Pages, MAP_PRIVATE, and Why Zero-Copy Matters

How mmap Works: File-Backed Pages, MAP_PRIVATE, and Why Zero-Copy Matters A process that wants the contents of a 4 GB file does not have to...

Sarthak Bystander 17 Sept, 2026

How Virtual Memory Works: Pages, Page Tables, and Page Faults

Why virtual memory exists A process does not own a private bank of RAM chips. It owns a private address space: virtual addresses the CPU wi...

Sarthak Bystander 5 Sept, 2026