Understanding 5 languages memory models (or most of them
summary
Compares how C, Rust, Python, Go and Java actually place and reclaim memory: C leaves heap allocation to malloc/free, Rust enforces ownership and borrowing so moves vs lends prevent use-after-free, Python uses reference counting with cycle detector so most frees are immediate but cycles need a secondary pass, Go uses mark-and-sweep per goroutine stacks without compaction, and Java adds generational mark-and-sweep with compaction to reduce GC frequency; notes Rust vectors double capacity (1,2,4...) and surprising fact that Swift uses ref counting.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:04Heap and stack basics
- 10:53Manual memory management
- 11:56Rust ownership model
- 18:41Python reference counting
- 23:37Go mark and sweep
- 28:29Java generational GC
- 31:17Language memory models overview
- 33:25Book and resources
- 34:07Q&A on performance
related talks
01h 02mThe Two Memory Models
01h 11mProgramming language memory models: Problems, solutions, and directions
30mA Tale of Shared Memory Concurrency in Programming Languages
51mMemory Model: Get your shared data under control
01h 28mC++ Memory Model: from C++11 to C++23
46mTour d’horizon de la gestion de la concurrence dans différents langages
40mA practical approach to Java Memory Model
27mThe Mutability Matrix of Pain
