memory leak detection patch

Mike McCormack mike at codeweavers.com
Wed Sep 21 10:08:20 CDT 2005


Hi,

This patch is written for MSI, but could be adapted to other code.  It 
keeps a linked list of allocated memory and removes free'd memory from 
the list.

It requires that you change all the HeapAlloc's or mallocs in a dll to 
msi_alloc (for example), but can detect unfree'd memory and invalid free's.

I have discovered quite a few problems in my own code with this patch, 
so hopefully somebody else will find it useful too.

Mike

-------------- next part --------------
A non-text attachment was scrubbed...
Name: msi-leak-detector.diff
Type: text/x-patch
Size: 7018 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050922/dfde6297/msi-leak-detector-0001.diff


More information about the wine-devel mailing list