Copy from Python Documentation :
Python memory management includes a heap containing all Python objects and data structures. This private heap is managed by the Python internal memory manager. The Python memory manager has various components that deal with various aspects of managing dynamic storage, such as sharing, segmentation, pre-allocation, or caching.
source share