Subject: Re: memory leak detection tools?
To: NetBSD User's Discussion List <netbsd-users@NetBSD.ORG>
From: Jorgen Lundman <lundman@lundman.net>
List: netbsd-users
Date: 04/04/2001 18:20:51
Yep, e-fence works great, another free one is "dmalloc" which you can
find on sourceforge and freshmeat.net. Works a treat. I use that and
Purify which seem to track down most things.  dmalloc has a thread
support too I believe.

Lund


"Greg A. Woods" wrote:
> 
> [ 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>


-- 
Jorgen "Lord" Lundman <lundman@lundman.net>
Technology Manager, Unix Administrator
Phone: +44 (020)8659-1860  Mobile: (07958)642-918
Pager: 07958642918@one2one.net
"Rare is the person who can weigh the faults of others 
 without putting his thumb on the scales": Byron J. Langenfeld