PostgreSQL Allocates Memory Fast
Every C program that wants to be fast needs to be fast at allocating memory. PostgreSQL allocates memory in the tightest loop imaginable: a hash join probes its hash table once per β¦
Every C program that wants to be fast needs to be fast at allocating memory. PostgreSQL allocates memory in the tightest loop imaginable: a hash join probes its hash table once per β¦
tmux splits a grid cell into two representations: a fat 32-byte in-memory form and a packed 5-byte stored form.
Freelists turn the first word of a dead object into a linked-list pointer, so the next list, tuple, or float pops a ready-made shell instead of hitting the allocator.
Pymalloc hands out small objects in a few instructions: one array lookup, one comparison, one free-list pop β and a radix tree that answers βis this pointer mine?β in O(1).