TGViewer
Linux - Reddit Linux - Reddit @r_linux · 1.04K subscribers
Post #42749 70
How fork() duplicates a process without copying its memory

I made a visual explainer on how copy-on-write works in Linux.

When a 10 GB process calls fork(), Linux does not immediately copy 10 GB of memory. It duplicates the page tables, points both processes at the same physical pages, marks them read-only, and waits for the first write.

The video also covers things like page faults,exec(), Redis snapshots, Android Zygote, lazy zero pages, memory overcommit, COW storms, and some CVEs, etc

Link for anyone interested

Feedback welcome :)

https://redd.it/1v0uqx6
@r_linux
YouTube fork() Looks Like Fraud Watch More Low Level Animated Deep Dives: https://youtube.com/playlist?list=PLMXMEKvLCzsI&si=TqIoC2dz4RkibIRk fork() creates a second process that appears to own the same memory as the first. So where is the copy? In this video, we follow what Linux actually…
More from @r_linux
  1. Sep 30, 2026AMD boosting AI/LLM performance for Radeon iGPUs as much as 18~23% with Linux 7.4 https://…
  2. Sep 24, 2026Canonical is speeding up Ubuntu's kernel updates because it's drowning in AI-discovered bu…
  3. Sep 11, 2026I realized something about Linux: Close to no reboots necessary! Under Win$lop I had to re…
  4. Aug 28, 2026postmarketOS Linux booted on iPhone 6S https://redd.it/1w0vkmn @r_linux
  5. Aug 28, 2026How did you first get introduced to linux? What is your story on how you became a linux us…
  6. Aug 27, 2026Linux currently has all time high market share at 7.5%, but what exactly happened in the l…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →