Memory leak detectors for C?
Solution 1
second the valgrind... and I'll add electric fence.
Solution 2
Valgrind under linux is fairly good; I have no experience under Windows with this.
Solution 3
If you have the money: IBM Rational Purify is an extremely powerful industry-strength memory leak and memory corruption detector for C/C++. Exists for Windows, Solaris and Linux. If you're linux-only and want a cheap solution, go for Valgrind.
Solution 4
Mudflap for gcc! It actually compiles the checks into the executable. Just add
-fmudflap -lmudflap
to your gcc flags.
Solution 5
lint (very similar open-source tool called splint)
AMIC MING
On a mission to transform the way legal work is done with technology.
Updated on July 20, 2022Comments
-
AMIC MING almost 2 years
What memory leak detectors have people had a good experience with?
Here is a summary of the answers so far:
Valgrind - Instrumentation framework for building dynamic analysis tools.
Electric Fence - A tool that works with GDB
Splint - Annotation-Assisted Lightweight Static Checking
Glow Code - This is a complete real-time performance and memory profiler for Windows and .NET programmers who develop applications with C++, C#, or any .NET Framework
Also see this stackoverflow post.