[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MPS: struct window, prev_buffers + next_buffers
From: |
Gerd Möllmann |
Subject: |
MPS: struct window, prev_buffers + next_buffers |
Date: |
Sat, 22 Jun 2024 09:24:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
I have some questions about the handling of window::prev_buffers and
next_buffers. These are handled in the existing GC in this function in
alloc.c:
/* Remove killed buffers or items whose car is a killed buffer from
LIST, and mark other items. Return changed LIST, which is marked. */
static Lisp_Object
mark_discard_killed_buffers (Lisp_Object list)
{
Lisp_Object tail, *prev = &list;
for (tail = list; CONSP (tail) && !cons_marked_p (XCONS (tail));
tail = XCDR (tail))
{
Lisp_Object tem = XCAR (tail);
if (CONSP (tem))
tem = XCAR (tem);
if (BUFFERP (tem) && !BUFFER_LIVE_P (XBUFFER (tem)))
*prev = XCDR (tail);
else
{
set_cons_marked (XCONS (tail));
mark_object (XCAR (tail));
prev = xcdr_addr (tail);
}
}
mark_object (tail);
return list;
}
IGC must do something with these lists, too, I guess.
Some questions:
1. Does igc really have to do something? I don't see something
noticeably growing, even after hours of using Emacs with igc.
2. Is it an option to leaving these lists alone in GC?
3. If igc should do something, how frequently? IOW what makes these
lists grow? And perhaps could we do this cleanup where new entries are
pushed onto them?
4. Note that the loop in the function stops when a cons cell is marked.
So it doesn't always take entries off the list that contain dead
buffers. I don't understand that at all.
TIA
- MPS: struct window, prev_buffers + next_buffers,
Gerd Möllmann <=
- Re: MPS: struct window, prev_buffers + next_buffers, Eli Zaretskii, 2024/06/22
- Re: MPS: struct window, prev_buffers + next_buffers, Gerd Möllmann, 2024/06/22
- Re: MPS: struct window, prev_buffers + next_buffers, Eli Zaretskii, 2024/06/22
- Re: MPS: struct window, prev_buffers + next_buffers, Gerd Möllmann, 2024/06/22
- Re: MPS: struct window, prev_buffers + next_buffers, Eli Zaretskii, 2024/06/22
- Re: MPS: struct window, prev_buffers + next_buffers, Gerd Möllmann, 2024/06/22