News

Why is the first C++ (m)allocation always 72 KB?

  • None--Joelsiks.com
  • published date: 2026-03-01 09:27:34 UTC

Why is the first C++ (m)allocation always 72 KB?? It’s the ’emergency pool’ for exceptions, here’s how I uncovered it using GDB and digging through the source code of libstdc++, glibc and Valgrind!

2026-02-28 Why is the first C++ (m)allocation always 72 KB? TLDR; The C++ standard library sets up exception handling infrastructure early on, allocating memory for an “emergency pool” to be able t… [+11637 chars]