OpenBSD’s built-in memory leak detection

Author:
Source

As
announced
on the
misc@
mailing list,
Otto Moerbeek (otto@),
the author of OpenBSD’s
malloc(3)
implementation
[a.k.a. “otto malloc”],
has written a
tutorial on the new
malloc(3) leak detection available in OpenBSD 7.4

Read it at:
OpenBSD’s built-in memory leak detection

Since the publication of that write-up,
Otto has
committed
further enchancements:

CVSROOT:	/cvs
Module name:	src
Changes by:	otto@cvs.openbsd.org	2023/10/22 06:19:26

Modified files:
	lib/libc/stdlib: malloc.3 malloc.c 

Log message:
When option D is active, store callers for all chunks; this avoids
the 0x0 call sites for leak reports. Also display more info on
detected write of free chunks: print the info about where the chunk
was allocated, and for the preceding chunk as well.
ok asou@

Read more