From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16483 invoked from network); 17 Dec 1999 07:16:38 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Dec 1999 07:16:38 -0000 Received: (qmail 2095 invoked by alias); 17 Dec 1999 07:16:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9096 Received: (qmail 2088 invoked from network); 17 Dec 1999 07:16:26 -0000 From: "Bart Schaefer" Message-Id: <991217071610.ZM17352@candle.brasslantern.com> Date: Fri, 17 Dec 1999 07:16:10 +0000 In-Reply-To: <199912160956.KAA13359@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: zsh and memory" (Dec 16, 10:56am) References: <199912160956.KAA13359@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: zsh and memory MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 16, 10:56am, Sven Wischnowsky wrote: } Subject: Re: zsh and memory } } [...] I looked who was using lots of heap memory and found the } tokstr handling in lex.c. There we always allocate at least 256 bytes } and if the buffer needs expanding (in add()) in gets resized to } inbufct (or larger). Some more investigation showed that we almost } never need a tokstr with more than 32 bytes, so I changed that. I also } changed add() to be more careful when expanding the buffer -- I left } the old code conditioned out because I don't kno if there was a reason } to resize it to inbufct bytes; I at least don't see a reason for that. Probably the idea was to eliminate lots of small allocations in the event that the "token" is a long quoted string or the like, for speed. We should watch out for performance problems if those changes are kept. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com