[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "du -b --files0-from=-" running out of memory
From: |
Pádraig Brady |
Subject: |
Re: "du -b --files0-from=-" running out of memory |
Date: |
Tue, 25 Nov 2008 15:09:06 +0000 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
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.
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.
cheers,
Pádraig.