OpenBSD's built-in memory leak detection (www.drijf.net)
from tedu to openbsd on 13 Oct 2023 22:01
https://azorius.net/g/openbsd/p/km82R4gpjXjH446r15-OpenBSDs-builtin-memory-leak-detection

Around 2011 worked on improving the speed of the allocation of small chunks. Working on that, I really got into the mood to return to the old goal of adding a feature that is very useful to developers: memory leak detection. Once I realized I could use a compiler feature to determine the address of the code malloc has been called from, I got on a roll. While the original code worked, it had some drawbacks and for various reasons the leak detection code was never compiled by default until I rewrote it in 2023. OpenBSD 7.4, released in 2023 has leak detection available, switched off by default. In this page I'd like to show how to use this feature.

#openbsd

threaded - newest