~/talk

Lies Programmers Believe about Memory

Talkat SREcon25 Americas · 2025-03-25..03-27· [linux-and-operating-systems]
slides:none on file

Claim: malloc doesn't allocate RAM — Linux overcommits and uses demand paging so physical pages appear only on page faults. Freeing often only returns memory to the allocator, not the kernel, so RSS lies. Cgroup v2 features used: memory.low protection and memory.max limits; swap prevents binary out‑of‑memory cliffs. Built and used Senpai (uses PSI + memory.high) to probe working sets; example kernel build peaks ~800 MB, runs fine at 400 MB but fails at 300 MB, Senpai reports ~340 MB needed.

AI-written summary · about

  1. 0:00Introduction
  2. 1:19Memory Management Goals
  3. 2:17Overcommit and Paging
  4. 6:32Virtual Memory Mechanics
  5. 7:57Allocating Memory
  6. 11:03Freeing Memory
  7. 14:22DRAM and Caches
  8. 19:57Memory Types and Metrics
  9. 22:42Cgroups and Limits
  10. 26:43Memory Protection
  11. 29:07In Defense of Swap
  12. 32:21Measuring True Usage
  13. 36:45Senpai Tool
  14. 39:36Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.