Beyond Python Heap: Fixing Memory Retention with Jemalloc
Heap usage remained stable while memory kept increasing; Memray helped uncover allocator-level memory retention, and tuning jemalloc successfully restored memory back to the host without requiring application code changes.