emacs-devel
[Top][All Lists]
Advanced

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

Re: Larger GC thresholds for non-interactive Emacs


From: Stefan Monnier
Subject: Re: Larger GC thresholds for non-interactive Emacs
Date: Thu, 23 Jun 2022 18:12:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> The difference between the two cases is that when you have half of the
>> heap made up of dead objects, there's a higher probability that some of
>> those objects are clustered such that they make up a few complete
>> 16kB blocks, whereas when only the dead objects represent only 10% of
>> the heap, almost all 16kB blocks will contain a mis of dead and live
>> objects and hence can't be returned to the malloc library.
>
> I am again confused.
> Does what you say imply that frequent GC with small threshold is not
> good because it will have less dead objects and have higher chance of
> fragmentation?

Not at all.  The general rule of thumb is: the sooner you recover free
space, the better you can avoid fragmentation.


        Stefan




reply via email to

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