PyCon India 2025

Jithu Sunny

Jithu is an Associate Product Architect at KeyValue Software Systems, based in Kerala. He works primarily on backend systems, with experience in both enterprise environments and freelance projects. With experience spanning ERP systems to modern cloud-native applications, he focuses on building scalable, maintainable systems using Python, Go, and related technologies. Jithu values clean architecture, practical design, and developer ergonomics.


Professional Link

https://www.linkedin.com/in/jisuka/


Session

09-13
12:10
30min
Memory Management in Python: Foundations, Problems, and Modern Techniques
Jithu Sunny

Memory management in Python is mostly automatic - but not invisible. From reference cycles and unexpected leaks to costly object growth and GC pauses, memory issues still affect real-world Python applications. Understanding how Python allocates, tracks, and reclaims memory is key to writing efficient and predictable programs - especially for long-running services, data-heavy scripts, or performance-sensitive tools.

This talk starts from first principles - how reference counting and garbage collection work - then builds up to real-world issues like circular references, hidden object retention, and finalizer behavior. We’ll explore modern tools like tracemalloc and pympler for memory diagnostics, and cover practical techniques like using slots, generators, and object reuse patterns. A live demo will walk through detecting and fixing a subtle memory leak. The goal is to make memory behavior in Python understandable, measurable, and improvable.

Python Core, Performance
Track 3