"High water" Memory fragmentation still a thing?

Antoine Pitrou antoine at python.org
Fri Oct 3 21:16:57 CEST 2014


Hello,

Croepha <croepha <at> gmail.com> writes:
> 
> Question:
> 
> Does python in general terms (apart from extensions or gc manipulation),
exhibit a "high water" type leak of allocated memory in recent python
versions (2.7+)?

It is not a leak. It is a quite common pattern of memory fragmentation.
The article is wrong in assuming that Python doesn't return the memory to
the OS. Python does return its empty memory pools to the OS, however the OS
itself may not be able to release that memory, because of heap fragmentation.

As the article mentions, this was improved (mostly fixed?) in 3.3.

Regards

Antoine.





More information about the Python-list mailing list