memwatch is an ANSI C fault tolerant memory leak and corruption detection tool. Basically, you add a header file to your souce code files, and compile with MEMWATCH defined or not. Check the README and USING files for more instructions.
| Tags | Software Development Debuggers Libraries |
|---|---|
| Licenses | GPL |
| Operating Systems | OS Independent |
| Implementation | C |
Recent releases


Changes: This version fixes a mwMalloc() bug for very large allocations (4GB on 32bits), and adds ULONG_LONG_MAX as a 64-bit detector.


Changes: An error in which mwRealloc() could leave the mutex locked was fixed. The licence was changed to the GPL. C++ array allocation was added.


Changes: Fixes for some harmless compile warnings when mutexes were not available.


Changes: This release includes additional auto detection of 64-bit platforms, mwRelink() no longer prints out a garbage pointer sometimes, an array destructor for C++, and mutex support.


Changes: Fixes for a couple of high-sensitivity warnings and the "might get clobbered" gcc warning that happened when aggressive inlining was enabled.
- All comments
Recent commentsRe: Can't contact author & missing file
Turns out my server got D.O.S:ed by some script kiddie in the Netherlands. Updated ProFTPd, so it should be OK now. Anybody reading this and unaware of this vulnerability, read this announcement (http://www.proftpd.org/proftpd-announce-archive/01-03/msg00002.html).
Re: Can't contact author & missing file
Yep, there was a brief period where a faulty 2.66 was up there (a day, approximately). Also, my server was down during this weekend, so any mails directed there -may- have bounced. Finally, note that my email domain has changed, link-data.com is no longer active, use linkdata.se (if that was not the case).
"Misery loves company"... or something... :)
/J
Can't contact author & missing file
In the README it says a demo called test.c
can be compiled and reviewed for tutorial
purposes but the latest distribution did not have
that file and when I tried to e-mail them my
mail bounced.
Hope someone is reading this, the header files
were not very intuitive and I would really like
to see a demo source.
Definitely worth a try
After trying a few other memory watchers, this is the one I have settled down with. It does not have as many features as other memory watchers, like dmalloc, but it is very quick to setup and use. It'll write to memwatch.log a list of unfreed memory, double freed memory, etc and point out the exact line number in which they occur. For double-freed pointers, it'll show you both places where it was freed. At the end of the logfile it provides a little summary of how many allocations the program made, how many bytes weren't freed etc.