Skip to content

References · 03 · malloc#

Dynamic memory allocation, from boundary tags to fleet-scale allocators.

6 works · difficulty: ★☆☆ accessible · ★★☆ technical · ★★★ research-grade
Read with the three-pass method. Every link is a Google Scholar search for the exact title. Master index →

Foundations#

★★★ The Art of Computer Programming, Vol. 1: Fundamental Algorithms (3rd ed.)#

Donald Knuth · 1997 · Addison-Wesley · book · Scholar ↗

  • Why: Boundary-tag coalescing, first fit vs best fit. Your block layout comes from here.
  • Read: §2.5.

★★☆ Dynamic storage allocation: A survey and critical review#

Wilson, Johnstone, Neely & Boles · 1995 · International Workshop on Memory Management · paper · Scholar ↗

  • Why: The survey that corrected decades of folklore about fragmentation.
  • Read: §1–3.

Real allocators#

★★☆ Hoard: A scalable memory allocator for multithreaded applications#

Berger, McKinley, Blumofe & Wilson · 2000 · ASPLOS · paper · Scholar ↗

  • Why: Hoard: per-processor heaps with provable bounds on blowup. The start of scalable malloc.
  • Read: §1–4.

★★☆ A scalable concurrent malloc(3) implementation for FreeBSD#

Jason Evans · 2006 · BSDCan · paper · Scholar ↗

  • Why: jemalloc: arenas, size classes and thread caches.
  • Read: All of it.

★★☆ Mimalloc: Free list sharding in action#

Leijen, Zorn & de Moura · 2019 · APLAS · paper · Scholar ↗

  • Why: mimalloc: free-list sharding per page. Simple, fast and elegant.
  • Read: All of it.

★★★ Beyond malloc efficiency to fleet efficiency: a hugepage-aware memory allocator#

Hunter et al. · 2021 · OSDI · paper · Scholar ↗

  • Why: Google's TCMalloc redesign for huge pages: allocator design at datacenter scale.
  • Read: §1–4.