Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#245678: zsh: built-in rm -rf fills up the memory
- X-seq: zsh-workers 19832
- From: Clint Adams <clint@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Bug#245678: zsh: built-in rm -rf fills up the memory
- Date: Sun, 25 Apr 2004 17:12:39 -0400
- Cc: zsh-workers@xxxxxxxxxx, 245678-submitter@xxxxxxxxxxxxxxx
- In-reply-to: <1040425204530.ZM25792@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20040424162150.GA4210@xxxxxxxxxxxxx> <20040425013647.GA28395@xxxxxxxxxxx> <1040425204530.ZM25792@xxxxxxxxxxxxxxxxxxxxxxx>
> Assuming that it's the zsh/files module, the interesting thing there is
> that, because it's a depth-first traversal, it allocates zsh-heap memory
> to store all the file names in the directory, and it does so by growing
> the allocated heap block once for each filename, by the length of that
> filename (plus one). If ZSH_MEM was not defined at compile time, doing
> this efficiently is left up to the underlying malloc() implementation [if
> I'm reading mem.c correctly] and therefore could be subject to bugs we've
> seen before where malloc never reclaims nor consolidates blocks when the
> implementation repeatedly realloc()s in slightly larger chunks.
>
> I don't know anything about how zsh is compiled on debian or even why
> the zsh/files module would be used (seemingly) by default, but in that's
> probably the place to start looking.
Yes, sorry. We're talking about when zsh/files is loaded explicitly.
ZSH_MEM isn't being defined.
Is there perhaps a mallopt() setting which would help?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author