[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: What's the use of FEATURE_CLEANUP ?
From: Rob Landley <rob () landley ! net>
Date: 2005-12-20 16:52:21
Message-ID: 200512201052.21862.rob () landley ! net
[Download RAW message or body]
On Tuesday 20 December 2005 10:02, Larry Doolittle wrote:
> Rob -
>
> On Mon, Dec 19, 2005 at 05:56:19PM -0600, Rob Landley wrote:
> > On Monday 19 December 2005 12:36, Larry Doolittle wrote:
> > > I believe the rationale for FEATURE_CLEANUP is to facilitate
> > > memory-leak checkups with e.g., dmalloc. It flags memory
> > > locations that are _supposed_ to be left dangling at exit,
> > > so you can more easily find those that are _accidentally_
> > > left dangling at exit.
> >
> > I've always been a little unclear on the difference, myself. Either
> > we're relying on exit() to clean up everything, or we're not. What's the
> > middle ground for?
>
> If you malloc a buffer once, use it, and rely on exit() to clean
> up after yourself, that's a design decision.
And generally a good one for our purposes.
> If you malloc a buffer once for every directory entry in a tree
> walk, and never free any of them (or forget to clean up an
> occasional one because it has an odd number of characters and
> is lemon flavored), that's a bug.
And those free() calls aren't really optional.
> By flagging the first case to valgrind/dmalloc, it's easier to
> find the second case.
So FEATURE_CLEANUP should really be DEBUG_CLEANUP, then?
> - Larry
Rob
--
Steve Ballmer: Innovation! Inigo Montoya: You keep using that word.
I do not think it means what you think it means.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic