emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enlarge MAX_ALLOCA?


From: David Kastrup
Subject: Re: Enlarge MAX_ALLOCA?
Date: Sat, 21 Jun 2014 17:19:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

address@hidden (K. Handa) writes:

> In article <address@hidden>, Eli Zaretskii <address@hidden> writes:
>
>> That buffer is fixed in size, I don't know what.  Perhaps it's hard to
>> know in advance how much we will need.  I hope Handa-san could explain.
>
> The reason of making it fixed size is that I was just lazy
> and didn't expect that decoder/encoder were called so
> frequently.  :-( The reaons of 0x4000 was that most of the
> elisp files in lisp/language were less than 0x4000
> characters.
>
> And, yes, we can estimate the actually necessarey
> CHARBUF_SIZE as coding->src_bytes on decoding, and
> coding->src_chars on encoding.

malloc/free pairings with lots of different sizes tend to be more work
for the heap management.  Of course, for alloca just using the minimum
is perfectly appropriate.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]