Abstract
How does CPython really handle memory?
This talk follows an object’s full journey: allocation, refcounting, deallocation, freelists, and allocator swaps. You’ll see why memory seems to stick, how pymalloc and mimalloc differ, and what actually happens in hot loops. Leave with a sharp mental model for debugging performance, fragmentation, and apparent leaks.
About the speaker
Petr Andreev
Specializes in CPython internals, optimization, and high-performance computing.
Driven by GPU acceleration, CPU vectorization. Evolved from ML systems to CPython core research engineer.
8+ years leading teams in AI, maths, and physics. PyCon speaker.
Lecturer at Moscow Institute of Physics and Technology – top 1 Russian university.