emacs-devel
[Top][All Lists]
Advanced

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

Re: Quesition about Lisp_Vector


From: Eli Zaretskii
Subject: Re: Quesition about Lisp_Vector
Date: Sat, 12 Nov 2011 17:53:39 +0200

> From: "Stephen J. Turnbull" <address@hidden>
> Cc: address@hidden,
>     address@hidden,
>     address@hidden
> Date: Sun, 13 Nov 2011 00:45:29 +0900
> 
> Eli Zaretskii writes:
> 
>  > Having string data accessible through indirection allows to relocate
>  > strings without affecting callers who have references to Lisp strings
>  > in local variables.  (This is similar to the ability to relocate
>  > buffer text, because buffer text is also accessed through
>  > indirection.)
> 
> The implementation is similar, but the rationale is not.  Buffers
> cannot be allocated by the s[1] trick, because they could not grow
> bigger than the allocated size

I wasn't implying they could.  I was just explaining why accessing
string through indirection is important on its own right, not just
because of some optimization.  That is very much tangential to the
main issue discussed in this thread, so apologies if it disrupted the
discussion.

>  > These abilities are important, because strings, like buffers, can
>  > be large, so being able to relocate them during GC helps making
>  > more efficient use of the available memory.
> 
> I wonder if the problem is not more that there are so many of them
> allocated and deallocated, leading to fragmentation, rather than the
> size.

Yes, that too.



reply via email to

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