Memory tracking tools...

Status
Not open for further replies.

Corven

Smack-Fu Master, in training
50
Greets,

So what sort of experiences have folks had with various leak detection tools, and do you have a favorite? I'm talking about tools like Purify and Boundschecker...

I'm currently attempting to use both, and have discovered that our codebase seems to break every known tool in existence(maybe that says something about the state of the code, but I don't really think so...)

So I'm currently using BoundsChecker 6.6 and it does pretty well with a good number of leak types, except for items leaked from static objects. Purify seems to do pretty well with these types of leaks as well. Both have huge memory overhead(seem to anyways) and occasionally cause exceptions to be thrown where none were before.

Any hints on using these tools, or recommendations for other ones?

(I've been using BC for a few years, and up until recently I felt that their tools were top-notch, now I'm not so sure).
 

virtualdub

Wise, Aged Ars Veteran
165
Before you resort to running slow check builds instrumented by those tools, you might want to look into the memory checking capabilities of the Debug build of the Visual C++ run-time library. Basically, in a Debug build you can call _CrtDumpMemoryLeaks() from <crtdbg.h> to have the CRT list outstanding memory blocks. It's not nearly as powerful as Purify or BoundsChecker, but it's more convenient and definitely faster, and helps you stomp the obvious leaks before raking the app over the coals.
 
Status
Not open for further replies.