Skip to content
Opensource internals
  • Posts

Memory

PostgreSQL Allocates Memory Fast

Sep 19, 2026 40 min read Jay Hubbert

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 …

PostgresPerformanceMemoryInternals

Read more →

tmux Stores Grid Cells in Five Bytes

Jul 22, 2026 8 min read Jay Hubbert

tmux splits a grid cell into two representations: a fat 32-byte in-memory form and a packed 5-byte stored form.

TmuxPerformanceInternalsMemory

Read more →

CPython Reuses Objects with Free Lists: Recycling Dead Objects for Free

Mar 14, 2026 7 min read Jay Hubbert

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.

PythonCpythonInternalsPerformanceMemory

Read more →

CPython's Pymalloc: A Fast Allocator for Small Objects

Nov 11, 2025 7 min read Jay Hubbert

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).

PythonCpythonInternalsMemoryPerformance

Read more →

← Newer Page 2 of 2 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·