[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indentation and gc
From: |
Ihor Radchenko |
Subject: |
Re: Indentation and gc |
Date: |
Sat, 11 Mar 2023 13:53:03 +0000 |
Eli Zaretskii <eliz@gnu.org> writes:
>> (pcase (* (car (memory-info)) ; in kb
>> 1000)
>> (`nil 800000) ; 800kb, old default
>> (ram
>> (let ((scaled-threshold
>> (* 0.7e-2 ; 800kb/128Mb for low-end systems.
>> ram)))
>> (min
>> (* 100 1000 1000) ; upper limit to avoid fragmentation
>> scaled-threshold))))
>
> The above implicitly assumes that gc-cons-threshold is the absolute
> ceiling of the memory Emacs can allocate. But that is not what that
> threshold means and how it is used. Even with the default threshold
> of 800K a running Emacs session can allocate much more than 800K
> bytes.
No. I took into account the fact that `gc-cons-threshold' is paired with
`gc-cons-percentage'. The latter scales with Emacs memory usage. For the
former, it makes sense to scale with available memory until
`gc-cons-percentage' takes over.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
- Re: Indentation and gc, (continued)
- Re: Indentation and gc, Dr. Arne Babenhauserheide, 2023/03/10
- Re: Indentation and gc, Eli Zaretskii, 2023/03/10
- Re: Indentation and gc, Dr. Arne Babenhauserheide, 2023/03/10
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Dr. Arne Babenhauserheide, 2023/03/11
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Dr. Arne Babenhauserheide, 2023/03/11
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Ihor Radchenko, 2023/03/11
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc,
Ihor Radchenko <=
- Re: Indentation and gc, Eli Zaretskii, 2023/03/11
- Re: Indentation and gc, Ihor Radchenko, 2023/03/12
- Re: Indentation and gc, Eli Zaretskii, 2023/03/12
- Re: Indentation and gc, Ihor Radchenko, 2023/03/12
- Re: Indentation and gc, Eli Zaretskii, 2023/03/12
- Re: Indentation and gc, Ihor Radchenko, 2023/03/13
- Re: Indentation and gc, Eli Zaretskii, 2023/03/13
- Re: Indentation and gc, Ihor Radchenko, 2023/03/13
- Re: Indentation and gc, Eli Zaretskii, 2023/03/13
- Re: Indentation and gc, Ihor Radchenko, 2023/03/13