Re: "du -b --files0-from=-" running out of memory

2008-11-25 Thread Jim Meyering
Pádraig Brady <[EMAIL PROTECTED]> wrote: >>> I notice that argv_iter does a malloc() + memcpy() per entry. >>> Since the sources are already NUL terminated strings >>> perhaps it could just return a pointer to a getdelim >>> realloc'd buffer which was referenced in the argv_iterator struct. >> >> T

Re: "du -b --files0-from=-" running out of memory

2008-11-25 Thread Pádraig Brady
Jim Meyering wrote: > Pádraig Brady <[EMAIL PROTECTED]> wrote: >> Jim Meyering wrote: >>> Subject: [PATCH 1/2] argv-iter: new module >>> >>> * gl/lib/argv-iter.h: New file. >>> * gl/lib/argv-iter.c: New file. >>> * gl/modules/argv-iter: New file. >> Very useful module! >> >> I see that --files0-fro

Re: "du -b --files0-from=-" running out of memory

2008-11-25 Thread Jim Meyering
Pádraig Brady <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> Subject: [PATCH 1/2] argv-iter: new module >> >> * gl/lib/argv-iter.h: New file. >> * gl/lib/argv-iter.c: New file. >> * gl/modules/argv-iter: New file. > > Very useful module! > > I see that --files0-from was added to `du` in Mar 20

Re: "du -b --files0-from=-" running out of memory

2008-11-25 Thread Pádraig Brady
Jim Meyering wrote: > Subject: [PATCH 1/2] argv-iter: new module > > * gl/lib/argv-iter.h: New file. > * gl/lib/argv-iter.c: New file. > * gl/modules/argv-iter: New file. Very useful module! I see that --files0-from was added to `du` in Mar 2004, so it's a nice solution to this 4 year old issue.

Re: "du -b --files0-from=-" running out of memory

2008-11-25 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Eric Blake <[EMAIL PROTECTED]> wrote: >> According to Barry Kelly on 11/23/2008 6:24 AM: >>> I have a problem with du running out of memory. >>> >>> I'm feeding it a list of null-separated file names via standard input, >>> to a command-line that looks like

Re: "du -b --files0-from=-" running out of memory

2008-11-24 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > [adding the upstream coreutils list] > According to Barry Kelly on 11/23/2008 6:24 AM: >> I have a problem with du running out of memory. >> >> I'm feeding it a list of null-separated file names via standard input, >> to a command-line that looks like: >> >>

Re: "du -b --files0-from=-" running out of memory

2008-11-23 Thread Barry Kelly
Eric Blake wrote: > [adding the upstream coreutils list] > > According to Barry Kelly on 11/23/2008 6:24 AM: > > I have a problem with du running out of memory. > > > > I'm feeding it a list of null-separated file names via standard input, > > to a command-line that looks like: > > > > du -b

Re: "du -b --files0-from=-" running out of memory

2008-11-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [adding the upstream coreutils list] According to Barry Kelly on 11/23/2008 6:24 AM: > I have a problem with du running out of memory. > > I'm feeding it a list of null-separated file names via standard input, > to a command-line that looks like: >

"du -b --files0-from=-" running out of memory

2008-11-23 Thread Barry Kelly
I have a problem with du running out of memory. I'm feeding it a list of null-separated file names via standard input, to a command-line that looks like: du -b --files0-from=- The problem is that when du is run in this way, it leaks memory like a sieve. I feed it about 4.7 million paths but ev