Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: MAX_ARRLEN



On Apr 24,  2:37pm, Peter Stephenson wrote:
} 
} As something to do now, I'd be tempted either to "#if 0" the code until
} someone can come up with a replacement that is demonstrably useful, or
} implement $ZSH_MAX_ARRAY_LENGTH and initialise it to 0 (no limit),
} applying it at the current definitely non-optimal location.  Either
} option at least gives us something basic usable, which the current code
} isn't really.  Anything beyond that still seems to be somewhat
} ill-defined and I'd like finally to have something non-broken ASAP.

I'm OK with just removing the check entirely.  It's not like we don't
have other places where the shell might run out of memory.  This one
was just particularly egregious back in the day because you could eat
vast amounts of memory with what looked like an innocuous subscript
expression.  (I think the strange number for the limit was based on
the assumption that you were creating a mostly empty array. If we used
linked lists [ala bash] this would never come up.)



Messages sorted by: Reverse Date, Date, Thread, Author