Subject: Re: bug#78917: feature/igc [PATCH] Avoid chaining finalizers together

From: Daniel Colascione <[email-masked]>
Date: Sun, 29 Jun 2025 14:20:38 -0400

Eli Zaretskii <[email-masked]> writes:

>> From: Helmut Eller <[email-masked]>
>> Date: Sat, 28 Jun 2025 06:42:45 +0200
>> 
>> Lisp_Finalizers are currently chained together in a doubly linked list.
>> This prevents them from being collected.  I propose that we simply don't
>> use this list with MPS.
>> 
>> The first patch is minimalistic: it only skips finalizer_insert when
>> creating finalizers.
>> 
>> The second patch is more thorough: it #ifdefs away the prev/next fields
>> entirely.
>
> Thanks.
>
> Daniel, could you please tell what was the intended purpose of
> chaining the finalizers?

How else do you sweep the unreachable ones at the end of GC?