emacs-devel
[Top][All Lists]
Advanced

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

Re: Memory again


From: Eli Zaretskii
Subject: Re: Memory again
Date: Sat, 26 Nov 2011 22:19:03 +0200

> Date: Sat, 26 Nov 2011 21:37:44 +0400
> From: Dmitry Antipov <address@hidden>
> 
> On 11/26/2011 06:48 PM, Eli Zaretskii wrote:
> 
> >> This is an internal heap fragmentation, the most common disadvantage
> >> of simple mark and sweep GC.
> >
> > I don't think buffers are subject to this disadvantage, because they
> > are relocated when needed.  Maybe I'm missing something, but please
> > elaborate to show what that is.
> 
> IIUC, buffer _text_ might be relocated if it can't be enlarged 'in place'.
> If buffer text is already mmap()ed and grows even more, this doesn't affect
> the heap allocated with sbrk(). Buffer itself ('struct buffer') can't be
> relocated, as well as all other Lisp objects.

That's true, but the buffer text is by far the largest component of
the buffer object.  It is also the only one that changes its size,
sometimes considerably, during the buffer's life.



reply via email to

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