Eirik Nygaard made a initial port of Valgrind to DragonFly, based on Doug Rabson’s FreeBSD work.
I am not sure for FreeBSD 4.x, but in FreeBSD 5.x you can use /etc/malloc.conf -> AJ instead to debug the memory. It does work great, but I don’t know how it compares with Valgrind. Linux doesn’t has the memory debug, so it will need Valgrind to help debug the things.
Valgrind catches things like reading uninitialized variables, too. That’s impossible with malloc.conf ;-) But malloc.conf doesn’t have such a big impact on performance
DragonFly BSD Digest