Subject: bug#37006: 27.0.50; garbage collection not happening after 26de2d42

From: Eli Zaretskii <[email-masked]>
Date: Tue, 13 Aug 2019 18:37:42 +0300

> From: Mattias Engdegård <[email-masked]>
> Date: Mon, 12 Aug 2019 19:00:37 +0200
> Cc: Joseph Mingrone <[email-masked]>, Paul Eggert <[email-masked]>,
>         [email-masked]
> 
> What about biasing consing_until_gc by gc_cons_threshold, and change the condition in maybe_gc to (the moral equivalent of)
> 
>  if (consing_until_gc < gc_cons_threshold)
> 
> ? It is practically as cheap as the current test against 0.

Yes, but the full calculation of the threshold is more complicated
than that.  For starters, how do you handle gc_cons_threshold values
that are smaller than GC_DEFAULT_THRESHOLD / 10 under your proposal?
There are use cases where the value was below that before and is above
now, or the other way around, or was below and stays below.

And that's even before we consider other complications: when
memory-full is non-nil, we should use a different threshold; and what
about user changes to gc-cons-percentage?