Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh and memory
- X-seq: zsh-workers 9096
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: zsh and memory
- Date: Fri, 17 Dec 1999 07:16:10 +0000
- In-reply-to: <199912160956.KAA13359@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199912160956.KAA13359@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author