detecting memory leaks in mac os x

Started by
2 comments, last by Evil Steve 16 years, 4 months ago
Hi, I'm developing a C application in MacOS X. What can I use to check my application for memory leaks? I've tried MallocDebug, but I'm getting "Unable to read malloc information from (null)". Plus, there's no Valgrind :( . Thanks
Advertisement
I don't know, but if you don't get the info you need here you might also try asking over at idevgames.com.

Any particular reason you're stuck with C? Memory leaks are generally not an issue in a well-implemented C++ application (and they're even less of an issue in some other languages).
Did you Enabling the Malloc Debugging Features?
My memory manager code

You'll need to edit it slightly to remove the stack trace stuff (Since it uses Win32 functions), and you'll need to remove / comment out the Assert()s and Log()s, but otherwise it should work fine. Or just use it as a reference for writing your own memory manager.

All it does it keep track of all allocations (By overriding global new/new[]/delete/delete[]) and spew out active allocations at program shutdown time.

This topic is closed to new replies.

Advertisement