From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#45200: Memory leaks: (garbage-collect) fails to reclaim memory Date: Sun, 05 Dec 2021 01:23:50 -0500 Message-ID: References: <20210124152402.40270-1-Hi-Angel@yandex.ru> <834kj64a36.fsf@gnu.org> <87tufovtxw.fsf_-_@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35228"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: fweimer@redhat.com, dj@redhat.com, carlos@redhat.com, Konstantin Kharlamov , Eli Zaretskii , 45200@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 05 07:25:13 2021 Return-path: Envelope-to: geb-bug-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 1mtkxU-0008vf-QZ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 07:25:13 +0100 Original-Received: from localhost ([::1]:33426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtkxS-0003UQ-TY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 01:25:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:43736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtkxK-0003UH-HV for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 01:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44575) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mtkxK-0008Qc-8Z for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 01:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mtkxK-0006Sp-0T for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 01:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 Dec 2021 06:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45200 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45200-submit@debbugs.gnu.org id=B45200.163868544124764 (code B ref 45200); Sun, 05 Dec 2021 06:25:01 +0000 Original-Received: (at 45200) by debbugs.gnu.org; 5 Dec 2021 06:24:01 +0000 Original-Received: from localhost ([127.0.0.1]:56121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtkwL-0006RJ-Fx for submit@debbugs.gnu.org; Sun, 05 Dec 2021 01:24:01 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:20791) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mtkwJ-0006R1-8v for 45200@debbugs.gnu.org; Sun, 05 Dec 2021 01:23:59 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 70ACD441B1E; Sun, 5 Dec 2021 01:23:53 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 07352441B18; Sun, 5 Dec 2021 01:23:52 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1638685432; bh=rIXXN1iE8tA1fXu8e1nkFU/WHndWOPjEksb2e4sdc3g=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=XgnIk1BYJGjipWq3feREihgKS+S8mkv+ApmOB5NGDdGP+Cu2d4U8+ajCKK8fyRRK+ gD2/ZndYLEMpWLksRCqh/EFrvQN7RDS/9fhv1mgdxIY0oSc6ImL7h2C7PKn7zz72u2 DjqvNC6Fd6W/1TeIfc8DCSVEhHXhA0xC4cYPrHOv/tluAwmxVfJkwmaKjaXU+uG1ZE 80mqwotISIiKnDrGiflGrqPMzPCEO7GrI/D7aapg3Uq31Rnd6wdWaot1ZWiz7v/J4R CudY/dwq2y4Hf87YX4RxWv26J+jbDHP9ixxZ7Wamff4ubtEX/kxTs1695RM92591EZ f7eBqpxyEFwDA== Original-Received: from pastel (unknown [216.154.30.173]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A10441202CE; Sun, 5 Dec 2021 01:23:51 -0500 (EST) In-Reply-To: <87tufovtxw.fsf_-_@gnus.org> (Lars Ingebrigtsen's message of "Sun, 05 Dec 2021 00:20:11 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221581 Archived-At: >> Thanks, but is it really a good idea to call malloc_trim each time we >> free some chunk of memory? > Skimming this very long thread, I think the conclusion was that we > shouldn't do anything in Emacs on this point. Does that sound correct? For me the conclusion was that I'd be happy to see someone add a `malloc-trim` primitive to ELisp, so that users can experiment with it, e.g. by adding it to `post-gc-hook`. Stefan