]> git.eshelyaron.com Git - emacs.git/commit
Simplify and shrink reader buffers
authorMattias Engdegård <mattiase@acm.org>
Wed, 14 Sep 2022 17:19:08 +0000 (19:19 +0200)
committerMattias Engdegård <mattiase@acm.org>
Thu, 15 Sep 2022 07:41:15 +0000 (09:41 +0200)
commit3ad2adc48c700a8c15459f623081c32420f0b726
treeba569adeb3286ae3b841b006f2f4bff7a7de35e2
parentf941cc76df7476a055350b3b1b7e9e61d1ddb246
Simplify and shrink reader buffers

A big on-stack buffer in a potentially long-running function can
interact badly with the GC's conservative scanning of the C stack.
It may make the scanning slower (since the stack frame is big) and
risks accidental retention of objects from stack detritus
(because the buffer isn't cleaned on entry).

* src/lread.c (stackbufsize): Remove.
(read_integer, read_string_literal, read_bool_vector): Use a local
buffer instead of piggy-backing on that in read0.
(read0): Reduce buffer to something suitable for most identifiers and
numbers.
src/lread.c