From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13349 invoked by alias); 23 Apr 2012 16:38:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30450 Received: (qmail 8923 invoked from network); 23 Apr 2012 16:38:38 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120423093812.ZM5059@torch.brasslantern.com> Date: Mon, 23 Apr 2012 09:38:12 -0700 In-reply-to: <20120423162711.42a6bad1@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "MAX_ARRLEN" (Apr 23, 4:27pm) References: <20120423162711.42a6bad1@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: MAX_ARRLEN MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Apr 23, 4:27pm, Peter Stephenson wrote: } } What's the right thing to do? There are various grades ranging from } making it compilable out, through making it compile-time configurable } with an option to compile out, through making it an option to have the } check turned on, to having a variable that we check using getiparam() } each time, to having a special variable so that we don't need to get it } each time. I think the last option with a clearly named variable such } as ZSH_MAX_ARRAY_LENGTH that can be set to 0 to turn it off is probably } the best. I think something based on one of the process limits would be good. Maybe combined with stashing it in a variable that can be modified. Maybe even putting that variable in a module so it's not visible in a barebones shell. datasize, stacksize, and addressspace are all candidates for how to figure out the limit. (Do we ever allocate arrays for zsh parameter expansion on the stack?)