emacs-devel
[Top][All Lists]
Advanced

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

Re: Enlarge MAX_ALLOCA?


From: Stefan Monnier
Subject: Re: Enlarge MAX_ALLOCA?
Date: Fri, 20 Jun 2014 09:02:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> Alternatively, how about using a different limit just in the 2 users
> of ALLOC_CONVERSION_WORK_AREA?

Why not just use `alloca' directly for those cases, then?

> I don't think the work area is what you think it is.  It is not for
> the result of the encoding/decoding; that is allocated elsewhere, and
> indeed uses a dynamic size computed from the source size.  This work
> area is for something else: for handling composition annotations
> (whatever that is).  See handle_composition_annotation and
> produce_annotation in coding.c.

I see, then indeed I have no idea what that's about.

>> > Again, the problem is memory fragmentation and the resulting large
>> > footprint, not the cost of the allocation.
>> Is this memory fragmentation problem hypothetical, or have we seen
>> evidence of it?
> Hypothetical.  I just don't like seeing such frequent sequences of
> malloc(64K)/free() one after the other several times a second in a
> live session.

I'd expect any non-toy implementation of malloc/free to handle this
without any serious risk of fragmentation, to tell you the truth.


        Stefan



reply via email to

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