Plurrrr

a tumblelog
05 Aug 2019

Memory management in Python

Everything in Python is an object. Some objects can hold other objects, such as lists, tuples, dicts, classes, etc. Because of dynamic Python's nature, such approach requires a lot of small memory allocations. To speed-up memory operations and reduce fragmentation Python uses a special manager on top of the general-purpose allocator, called PyMalloc.

In the evening I read Memory management in Python, a quick overview by Artem Golubin.