View Full Version : valgrind for mac

Jun 23, 2008, 08:16 AM
Hello, does anybody knows if i can use valgrind on my mac just downloading it from valgrind.org ? As the system is unix based i assume it should work but i am not too sure about it ?
thanks in advance.

Jun 23, 2008, 09:24 AM
Unfortunately, no. Valgrind uses a lot of OS and CPU specific functionality, so it must be rewritten for each combination. Look at this table: http://valgrind.org/info/platforms.html. Darwin (the Mac OS X kernel) on x86 is considered "high" priority, which is good news. The bad news is, it's been high priority for at least 4 years or more.

Jun 23, 2008, 09:26 AM
An x86/Darwin is high priority for the Valgrind team, but there is no port for that yet. The web page has a link to a Free BSD (http://www.freebsd.org/cgi/ports.cgi?query=valgrind) port, which is the closest you're going to get. You can download the source and see if it compiles.

Keep in mind there are other options for memory debugging other than Valgrind.

Jun 23, 2008, 10:33 AM
thanks a lot. I only know valgrind. What would be an equivalent running on mac ?
Thanks again.

Jun 23, 2008, 10:53 AM
Instruments.app (found somewhere under the Developer/ tree) can trace memory leaks. I haven't used Instruments yet for this purpose, so I can't comment on how it compares to Valgrind. You can read more about it here:


There's also the 'leaks' command-line utitlity.

Jun 23, 2008, 11:55 AM
I'll have a look. Thanks a lot.