Inside CPython’s Memory Allocator: Arenas, Pools, and Blocks
CPython ships its own specialised memory manager called pymalloc, which sits between the Python interpreter and the C-level malloc(). Pymalloc organises memory into a three-level hierarchy: Arena, Pool and Block Introduction Every time you create a small Python object — an integer, a short string, a tuple, a small dictionary — CPython has to find … Read full article: Inside CPython’s Memory Allocator: Arenas, Pools, and Blocks