GNU bug report logs - #75672
31.0.50; scratch/igc memory usage/collection issues

Previous Next

Package: emacs;

Reported by: Alexis Purslane <alexispurslane <at> pm.me>

Date: Sun, 19 Jan 2025 17:01:02 UTC

Severity: normal

Found in version 31.0.50

Done: Pip Cet <pipcet <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


Message #47 received at 75672 <at> debbugs.gnu.org (full text, mbox):

From: Pip Cet <pipcet <at> protonmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Alexis Purslane <alexispurslane <at> pm.me>, 75672 <at> debbugs.gnu.org
Subject: Re: bug#75672: 31.0.50; scratch/igc memory usage/collection issues
Date: Mon, 20 Jan 2025 14:19:29 +0000
"Eli Zaretskii" <eliz <at> gnu.org> writes:

>> Cc: 75672 <at> debbugs.gnu.org
>> Date: Mon, 20 Jan 2025 02:33:15 +0000
>> From:  Alexis Purslane via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>> committed                                    1       400138240  400138240             0
>> pause-time                                 nil             0.1        nil           nil
>> reserved                                     1       536875008  536875008             0
>> spare                                      nil            0.75        nil           nil
>> spare-committed                              1       217436160  217436160             0
>
> AFAIU, these 3 values mean that MPS uses about 1.15GB of memory
> (unless "reserved" includes "committed").  If "reserved" means memory

MPS "reserved" means "mmapped, not necessarily faulted in or used".
MPS "committed" means "faulted in and possibly in use by MPS or the
client program".
MPS "spare-committed" means "in use by MPS, not the client program".

So committed - spare-commited is how much usable memory MPS thinks has
been allocated, about 183 MB.

IIUC, the Emacs process was much larger than that, so something else is
wrong: either we got those numbers wrong somehow, or it's malloc()'d or
mmap()'d memory.

> MPS reserved but does not use, the question is why does it need so
> much reserved memory?

It's virtual memory: MPS assumes virtual memory is very cheap.  That's
not really true for processes that fork() a lot, so this assumption may
have to be fine-tuned.

Pip





This bug report was last modified 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.