From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: edgar Newsgroups: gmane.emacs.help Subject: Re: How to debug memory leaks Date: Thu, 25 Mar 2021 05:29:58 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25705"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Roundcube Webmail To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 25 06:31:07 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lPIaJ-0006c9-NW for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 25 Mar 2021 06:31:07 +0100 Original-Received: from localhost ([::1]:47400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPIaI-0004K2-Oe for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 25 Mar 2021 01:31:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPIZW-0004Js-Tv for help-gnu-emacs@gnu.org; Thu, 25 Mar 2021 01:30:19 -0400 Original-Received: from devianza.investici.org ([198.167.222.108]:24175) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPIZO-0006Aa-Fh for help-gnu-emacs@gnu.org; Thu, 25 Mar 2021 01:30:16 -0400 Original-Received: from 2.mail-backend.investici.org (unknown [10.0.0.12]) by devianza.investici.org (Postfix) with ESMTP id 4F5YZt6Yvwz6vG1 for ; Thu, 25 Mar 2021 05:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cryptolab.net; s=stigmate; t=1616650198; bh=Y0Katk21V02irYJkbo3gqFvAKXgIeegulpeIjVsCMkA=; h=Date:From:To:Subject:From; b=ROqU6n498KnM5obU5+ktklIIH0rxwqZ7Fp/cEmu2T5vrPKyvwEyIiMrHaRT2LzDx/ ieSOTn4W+zKaNPbyY7lgBVXTqz8pe3/jOlbqnef+Wzfq4a3nuoXnVucLnjJmpcexqR RAybopgKACMtqjENfgnYAKBSOD6N9oQuVxcPSPiM= Original-Received: from 2.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: edgar@inventati.org) by 2.mail-backend.investici.org (Postfix) with ESMTPA id 4F5YZt5f8pz2xCj for ; Thu, 25 Mar 2021 05:29:58 +0000 (UTC) X-Sender: edgarlux@cryptolab.net Received-SPF: pass client-ip=198.167.222.108; envelope-from=edgarlux@cryptolab.net; helo=devianza.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128546 Archived-At: 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)