This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: XFree leaking memory?
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: <cygwin-xfree at cygwin dot com>
- Date: Tue, 5 Nov 2002 21:17:58 +0100
- Subject: RE: XFree leaking memory?
- Reply-to: cygwin-xfree at cygwin dot com
> In other words, it might not be able to follow NEW or MALLOC, because the
> object format might be too different.
>
Try the mem_watch tool in the kde-cygwin cvs area
http://sourceforge.net/cvs/?group_id=27249, which hooks any memory relating
call.
$ less README
Memory Watcher
==============
This is a little library for tracing memory related api calls on win32 using
gcc.
Features:
- detection of unfree'd memory regions
- traces each malloc(), calloc(), realloc() and free() call
- collects size and addresses of allocated area
- runtime switchable logging support of hooked function
See INSTALL for installation hints.
The only thing you have to do is to adding a call after main() and perhaps one
call for printing the results at the end of main().
Try
$cvs -d:pserver:anonymous@cvs.kde-cygwin.sourceforge.net:/cvsroot/kde-cygwin
login
<empty password>
$cvs -z3 -d:pserver:anonymous@cvs.kde-cygwin.sourceforge.net:/cvsroot/kde-cygwin
co tools/mem_watch
$ make
$ make check
$ test.exe