Subject: Re: find uses 400MB memory
To: Simon Burge <firstname.lastname@example.org>
From: Chuck Silvers <email@example.com>
Date: 09/14/2001 08:29:04
we should really figure out how to make execvp() avoid using malloc()
rather than working around the problem in applications. vfork() and
execvp() is a natural combination, having them not work together is
we should be able to use some variable-length arrays to deal with this.
On Fri, Sep 14, 2001 at 06:20:54PM +1000, Simon Burge wrote:
> Simon Burge wrote:
> > Kazushi Marukawa wrote:
> > > That's true. I did quick check by "find . -type f -print"
> > > on the same disk and it didn't use memory so much. Sorry
> > > for doubting fts. I should check -print first. Thank you
> > > for the correction.
> > dmalloc (look in pkgsrc/devel/dmalloc) shows 26 lines like:
> > 1000452103: 113: not freed: '0x8096208|s3' (160 bytes) from 'ra=0x480cf1c9'
> > when "find . -type f -exec ls \;" is run on a directory with 26 files :(
> > I haven't looked any further than this yet.
> I've committed a fix for this - look for rev 1.36 of
> usr.bin/find/function.c. Basically, vfork() and execvp() don't mix.
> I'm looking for other occurances of this in our source tree.
> Simon Burge <firstname.lastname@example.org>
> NetBSD CDs, Support and Service: http://www.wasabisystems.com/