help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: How to debug memory leaks


From: edgar
Subject: Re: How to debug memory leaks
Date: Thu, 25 Mar 2021 05:29:58 +0000
User-agent: Roundcube Webmail

From:   Eli Zaretskii

It's unlikely.

Yet, it happened--more than once (did you notice that I said "my Emacs setup" and not "Emacs"?). The good news: it's not happening anymore :)

I'd start by looking in your init files for any customization that affects GC.

Also, if you use Emacs 27.1, try the RC2 release candidate of Emacs 27.2, I think it fixed a problem which could create a situation where GC is prevented.

So very interesting. I did have an Emacs compiled by my system, but when the problem surfaced, I went for my distro's package to see if that would solve it (not really). When I brought moe-theme back, I disabled the DejaVu Sans Mono font, and Emacs behaved well. It was really loading the TAGS which added like 400 MB on the stack (virtual and resident--yeah, sounds unlikely, right?). Therefore, I went to look for an alternative.

I am not a fan of having a subprocess running, but after trying eglot with clangd, I was convinced that 150 MB more on my stack would be acceptable. Even more, because it goes away once the buffer is closed.

I haven't done a garbage collect, and I know that having near 750 MB in virtual and 140 MB in resident memory is still a lot, but it is at least not +4 GB in between RAM and swap.

I would next compile Emacs, but I'll settle for this right now, and get some work done.

Thank you, Eli and all the developers for providing the world with the most customisable editor ever! (sorry to Mr. Stallman for calling it an editor)



reply via email to

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