Is it me or Python memory management? 🤔💻
summary
Explains that every Python value lives on a private heap as an object with fields (value, type, reference count), shows how assignments increment and decrement refcounts, and describes the two-pronged cleanup: immediate reference counting and cyclic garbage collection with configurable thresholds and manual calls like gc.collect. Demonstrates practical diagnostics with memory_profiler, warns that caches and reference cycles create “immortal” objects, and recommends hardware choices (RAM/SSD/CPU) based on workload.
AI-written summary · about
chapters (8)
- 0:00Introduction and speaker intro
- 1:10Performance factors overview
- 3:16Hardware components for Python
- 9:25Python memory manager explained
- 12:16Python objects and references
- 15:33Reference counting and garbage collection
- 17:40Key takeaways and optimization tips
- 19:29Q&A session
related talks
27mDemystifying Python’s Generational Garbage Collector
23mPython Memory Understanding
25mTime to Take Out the Trash: garbage collector
23mMemoirs of a Python Object: Memory Management and Improving Performance
01h 18mPython 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods
40mKnowing your garbage collector
01h 18mPython 103: Mmmm... Understanding Python's Memory Model, Mutability, and Methods
28mMemory management in CPython, fast or slow?
