Subject: Re: memory leak detection tools?
To: Caffeinate The World <mochaexpress@yahoo.com>
From: Greg A. Woods <woods@weird.com>
List: netbsd-users
Date: 04/04/2001 12:52:04
[ On Wednesday, April 4, 2001 at 19:04:23 (+1000), Giles Lean wrote: ]
> Subject: Re: memory leak detection tools? 
>
> 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.

Yes Electric Fence is a cool tool.  It's available in pkgsrc/devel too.

Phong Vo's vmalloc, available for free (but not under a free copyright
license) from AT&T, has the best profiling, tracing, and debugging
support of any similar tool I've used (I have not used Purify).

I was going to check if vmalloc was hidden inside sfio too, but it seems
I can't extract packages right now until I fix pkgsrc's new "digest"
program (which fails to build on my machine!).

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

NetBSD's malloc library has quite a bit of debugging support built right
in, though not much in the way of useful usage profiling....

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

especially to somone new at programming C (which is probably not the
world's best language for threads programming, at least not unless
you're a Unix kernel developer!)
 
-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>