This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XFree leaking memory?


> 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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]