Subject: Re: memory leak detection tools?
To: Caffeinate The World <mochaexpress@yahoo.com>
From: Giles Lean <giles@nemeton.com.au>
List: netbsd-users
Date: 04/04/2001 19:04:23
> i'm really new to programming in C. one of the app i'm working with (i
> didn't write it, someone else did) is leaking memory. for those of you
> who are more fluent in C, what steps do you go through and what tools
> do you use to find out where the memory is leaking. 

Purify is the best tool ... but is commercial and doesn't run on
NetBSD.  If you have access to a system with Purify on it, that's the
way to go.

Electric Fence is a malloc()/free() library that may help; it's
probably in the packages collection.  I've used Electric Fence for
memory corruption problems (writing beyond allocated memory, or freed
memory) but I don't recall if it keeps statistics on allocated but not
freed memory.

I think "dmalloc" is the name of another debugging malloc library.

> this application also use threads, so that may add another twist to
> things. thanks in advance.

Threads always make things harder.

Regards,

Giles