Overview
Explore the intricacies of Python's garbage collection mechanisms in this 40-minute EuroPython Conference talk. Delve into the automatic memory management that allows Python programmers to code without manually allocating and freeing memory. Gain a deeper understanding of the underlying interpreter and learn why issues like cycles can occur in CPython interpreters. Examine different approaches to garbage collection, including the Generational Reference counting with cycles detector used in CPython and the Incremental version of the MiniMark GC employed by PyPy. Discover the history, definition, and tradeoffs of garbage collection techniques. Investigate memory leaks, cycle detection, and implementation details through examples and demonstrations. Analyze potential problems and explore incremental approaches to garbage collection. Enhance your knowledge of Python's memory model and improve your programming practices by understanding the inner workings of this crucial language feature.
Syllabus
Intro
Agenda
Motivation
Memory Manual
Garbage collection in every scenario
History of garbage collection
Definition of garbage collection
Garbage collection tradeoffs
Example
Cycles
Memory Leaks
Garbage Collectors
Cycle Detection
Implementation
Iterating
Check reachable objects
Move to next generation
Python demo
Some problems
Incremental
Pipe
Memory Model
Faces
C Python
Taught by
EuroPython Conference