Jump to content
  • Advertisement
Sign in to follow this  
15step

detecting memory leaks in mac os x

This topic is 4007 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!