Dynamic Memory in C: Why Your malloc Checks Still Matter
Unchecked malloc returns still crash production C code. This post covers malloc, calloc, realloc, and free with a worked string-buffer example, the realloc trap, and a verification checklist using AddressSanitizer and Valgrind.