Re: Performance issue with new gtk 2.0 for win32

Tor Lillqvist <[email protected]>
Newsgroups gmane.comp.video.gimp.windows.devel
Message-ID <[email protected]>
Harring Figueiredo writes:
 > What is the approach you guys use to track memory leak on windows
 > when programming GTK. I use Valgrind on linux, but my app depends
 > on another Windows app; therefore, I cannot trace it on linux
 > alone.

I guess Purify is good, but it's expensive. BoundsChecker too,
perhaps, but I have a feeling Purify's memory leak detection is
better. I have access to BoundsChecker (on Windows) and Purify (on
Unix) at work, but haven't used either for GTK+.

Last time I really had to track down a memory leak in GTK+ (actually,
in pangowin32) I just added debugging printout to g_malloc and g_free,
run a loop in a test program that clearly leaked memory, did some
mangling on the output with Emacs keyboard macros to delete
corresponding allocations and deallocations, which left the printout
from the offending allocations that weren't being deallocated. Luckily
the number of bytes allocated in those leaks was the same all the
time, and unique (at least in the loop), so it was then just a matter
of setting a conditional breakpoint that fired when allocatiing this
number of bytes.

--tml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.