emacs-devel
[Top][All Lists]
Advanced

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

Re: MPS: struct window, prev_buffers + next_buffers


From: Eli Zaretskii
Subject: Re: MPS: struct window, prev_buffers + next_buffers
Date: Sat, 22 Jun 2024 12:50:28 +0300

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: emacs-devel@gnu.org,  eller.helmut@gmail.com
> Date: Sat, 22 Jun 2024 10:53:57 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> But it won't be GC'd anyway, becuase it's marked. And if the buffer in
> >> the cons is killed, it remains in the list. That makes no sense to me.
> >
> > But the code doesn't GC buffers, it just removes them from the
> > prev_buffers and next_buffers lists.  If a cons cell of the list is
> > marked, removing the buffer (which could subsequently lead to GC'ing
> > the buffer) might not be expected by the code which uses data that
> > references that buffer, even though the buffer is killed.
> 
> You mean the possible change to the cdr of the cons cell could affect
> the client? Hm, that could be the reason. Thanks.
> 
> I think I'll try to let window-{next,prev}-buffers clean the list
> before returning it. It doesn't look like something to me that a weak
> vector or something like that could solve. WDYT?

That would work, but what if these functions are not called for a
while?

Also, it would make these simple accessors more expensive.



reply via email to

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