[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scratch/igc: Implications of MPS being asynchronous
From: |
Eli Zaretskii |
Subject: |
Re: scratch/igc: Implications of MPS being asynchronous |
Date: |
Mon, 13 Jan 2025 14:36:17 +0200 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sun, 12 Jan 2025 21:59:28 +0000
> Cc: pipcet@protonmail.com, emacs-devel@gnu.org, gerd@gnu.org,
> eller.helmut@gmail.com
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Stefan Kangas <stefankangas@gmail.com>
> >> Date: Sun, 12 Jan 2025 16:55:54 +0000
> >> Cc: pipcet@protonmail.com, emacs-devel@gnu.org, gerd@gnu.org,
> >> eller.helmut@gmail.com
> >>
> >> (IMHO, the code organization is a bit funny here, because
> >> garbage_collect() doesn't do what it says on the tin. I don't think
> >> it's worth addressing that right now though. Maybe it's worth taking a
> >> second look after merging.)
> >
> > If we want to add igc_collect somewhere which is called by
> > garbage-collect, we should add it to garbage_collect, because what you
> > call "funny" here is quite confusing. Are there any good reasons not
> > to call igc_collect from garbage_collect?
>
> AFAIU, MPS should decide when to GC, not maybe_gc.
OK, but then the non-mark-and-sweep part should be factored out of
garbage_collect into a separate function, which should be called from
garbage-collect.
IOW, the fact that with MPS we want to do some part of
garbage_collect, but not the other, doesn't mean a function called
"garbage_collect" should not collect garbage when MPS is used, because
that's very confusing and unclean, IMO.
Btw, which control path triggers calls to garbage_collect in the MPS
build? The various memory-related cleanups we do in garbage_collect,
like compacting buffer text, font caches, and buffer-undo-lists, are
important to be done, so they should not be called only from
garbage-collect. I seem to be unable to make Emacs enter
garbage_collect without invoking garbage-collect from Lisp or
manually. If that means we never compact all those memory resources,
it's not good, I think?
Or what am I missing?
- Re: scratch/igc: Implications of MPS being asynchronous, (continued)
- Re: scratch/igc: Implications of MPS being asynchronous, Eli Zaretskii, 2025/01/12
- Re: scratch/igc: Implications of MPS being asynchronous, Stefan Kangas, 2025/01/12
- Re: scratch/igc: Implications of MPS being asynchronous, Eli Zaretskii, 2025/01/12
- Re: scratch/igc: Implications of MPS being asynchronous, Stefan Kangas, 2025/01/12
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/12
- Re: scratch/igc: Implications of MPS being asynchronous, Eli Zaretskii, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous, Eli Zaretskii, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous, Eli Zaretskii, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous,
Eli Zaretskii <=
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous, Eli Zaretskii, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/13
- Re: scratch/igc: Implications of MPS being asynchronous, Eli Zaretskii, 2025/01/25
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/25
- Re: scratch/igc: Implications of MPS being asynchronous, Pip Cet, 2025/01/25
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/25
- Re: scratch/igc: Implications of MPS being asynchronous, Pip Cet, 2025/01/25
- Re: scratch/igc: Implications of MPS being asynchronous, Gerd Möllmann, 2025/01/25
- Re: scratch/igc: Implications of MPS being asynchronous, Pip Cet, 2025/01/25