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: Tue, 14 Mar 2023 14:19:06 +0200

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: arne_bab@web.de, spacibba@aol.com, emacs-devel@gnu.org
> Date: Mon, 13 Mar 2023 18:04:43 +0000
> 
> > Ah, you mean RES.  That's the "resident" part of the memory, i.e. what
> > the OS decided to keep in physical memory at this point; the rest is
> > swapped out.  Basically, RES is not interesting, only the total
> > virtual memory of the process (VIRT) is, because that's what is
> > counted towards the total VM of the system.  Although the complication
> > is that VIRT also includes the so-called "reserved" memory, which is
> > not necessarily in-use yet.
> 
> This is a bit confusing then.

It definitely is.

> From my experience, RES is often closer to the memory-report
> results.

Not surprisingly, since Emacs touches Lisp objects very frequently
(every GC), so they are likely to be in the resident set.

> 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



reply via email to

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