emacs-devel
[Top][All Lists]
Advanced

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

Re: Indentation and gc


From: Eli Zaretskii
Subject: Re: Indentation and gc
Date: Wed, 15 Mar 2023 14:54:29 +0200

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: arne_bab@web.de, spacibba@aol.com, emacs-devel@gnu.org
> Date: Wed, 15 Mar 2023 10:28:22 +0000
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Moreover, VIRT can exceed Memory + Swap combined.
> >
> > Yes, because VIRT includes the "reserved" memory, which is memory not
> > yet in-use, but which the application "reserved" for itself and
> > generally intends to use at some point, and so it cannot be used by
> > other processes.  See
> >
> >   
> > https://stackoverflow.com/questions/2440434/whats-the-difference-between-reserved-and-committed-memory
> >   https://www.baeldung.com/linux/resident-set-vs-virtual-memory-size
> 
> Then, from what I can read, it does not look like VIRT truly represents
> how much memory Emacs is going to use. It is safe to assume that only a
> fraction of VIRT will be used in practice.

I don't think I follow your logic.

Emacs can have more memory in use than the physically installed
amount, it just means each GC will be painfully slow, because it will
need to swap in parts of memory and swap out other parts.  In theory,
Emacs can use all the VM there is, minus what other processes and the
OS use.

If your bother is about the "reserved" part, that is not supposed to
be large, but maybe glibc has its own ideas about that, because your
report about VIRT vs RES surprised me.



reply via email to

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