Hacker News new | ask | show | jobs
by jackdied 6495 days ago
Long story short: CPython uses a custom memory allocator on top of the OS malloc because some mallocs are really bad and python knows more about it's memory usage patterns than the OS. The newer CPython allocator plays better with popular OS's so that repeatedly newing and freeing lots of objects is more likely to return memory to the system.

The old behavior didn't effect server sized systems and typical workloads but it did piss off some embedded apps.