NOTE
Linux Memory Management
Virtual address spaces, page tables, anonymous/file-backed memory, page cache, reclaim, swap, and OOM.
This is a historical learning note and may contain outdated or incomplete understanding.
Linux gives each process a virtual address space mapped to physical pages and other backing objects through page tables. Memory can be anonymous, file-backed, shared, mapped, or allocated inside the kernel.
The kernel reclaims memory from caches and reclaimable pages under pressure; anonymous pages may be swapped when swap is configured. The page cache is useful memory, not automatically “wasted RAM.”
When diagnosing memory, distinguish virtual size, resident memory, anonymous/file-backed pages, page cache, swap activity, allocator retention, and cgroup limits. OOM behavior depends on the effective memory domain and reclaim options.