From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#45200: [PATCH] Force Glibc to free the memory freed Date: Wed, 3 Feb 2021 16:14:54 +0100 Message-ID: <63edbd63-29d8-0a32-55a4-28fd526b5d7a@gmx.at> References: <83k0rz21dw.fsf@gnu.org> <331805c74fc5d3d412dd2065030b11fa3343710d.camel@yandex.ru> <8a91fc16f93298bca1281b43d6821ae3621376dc.camel@yandex.ru> <7ffacc5f-fc0e-a5f8-104d-2c0ae8e06953@gmx.at> <3f4f8b3034e9f52f48ec520f2732b1687bb24dbc.camel@yandex.ru> <31608795-6155-c7c9-7d94-6024adb0a3b9@gmx.at> <09cc70f14e90f6b13b51b0536fae76e87dfe3f42.camel@yandex.ru> <55be0318-c907-bf9b-d644-d88abb816871@gmx.at> <35163027-a5b7-4a6c-6700-69d34fecf451@gmx.at> <824625557ce288b0cbc3edd66ff730afd479b511.camel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38725"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlos@redhat.com, fweimer@redhat.com, 45200@debbugs.gnu.org, dj@redhat.com To: Konstantin Kharlamov , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 03 16:16:14 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 1l7Jt8-0009yM-OV for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Feb 2021 16:16:14 +0100 Original-Received: from localhost ([::1]:42700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7Jt7-0002bb-Og for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Feb 2021 10:16:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Jsw-0002ZE-U0 for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2021 10:16:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55289) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7Jsw-0007eF-Ls for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2021 10:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7Jsw-0003Mh-FX for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2021 10:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Feb 2021 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45200 X-GNU-PR-Package: emacs Original-Received: via spool by 45200-submit@debbugs.gnu.org id=B45200.161236531212800 (code B ref 45200); Wed, 03 Feb 2021 15:16:02 +0000 Original-Received: (at 45200) by debbugs.gnu.org; 3 Feb 2021 15:15:12 +0000 Original-Received: from localhost ([127.0.0.1]:38594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7Js8-0003KO-0O for submit@debbugs.gnu.org; Wed, 03 Feb 2021 10:15:12 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:34691) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7Js3-0003Jk-QT for 45200@debbugs.gnu.org; Wed, 03 Feb 2021 10:15:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1612365296; bh=JnFh8c6RbHH7QzYhvFG/3goND39i02X3B9bSDtm/lbQ=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=d4UBCKokfhtKKTtBGqv7o+yrwWHauXp1J2ndXWnEmw5KddGuuRPeg5BcDp69NOx7g frKlmB1KjuxPMEhzUnO7HtGfuJMbnjNBSCngqFXAYEGldUYG0sj4gZYHHkztSDv7je ATvu36doUBaa/fpdDw6z9krBYB3nPFJXDDBGeXIc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.100] ([46.125.249.123]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MFKGZ-1l9jVB158z-00Fn3M; Wed, 03 Feb 2021 16:14:56 +0100 In-Reply-To: <824625557ce288b0cbc3edd66ff730afd479b511.camel@yandex.ru> Content-Language: en-US X-Provags-ID: V03:K1:NZNRmQ3PvstIfVEFo/Nz7Ezlwmt4nfhkRlUu7eZHOqvrF1f5Ytt 53H9yGL/IokZkCo1QMBBq0KfVtvyrQkDJjfqwmOjL7Zs07y0VQ/Zaoh7MUIe0So8V50sJSd eW0lvmfISzDiJrSzShnnyrxmQZTh+SYvH7E2RDahYAm1mnWOa8k9ILwuijCaQziqc8y5uk1 DKj9pvEGbUoVRk3iW1/Sw== X-UI-Out-Filterresults: notjunk:1;V03:K0:MM2PDbmxD+E=:GeRZrwW21nR4UW43cKoshl uRy9oAeDf7SfuyHBw2qTeLs3ivod6XcYn4UwdsuHJc4kM17VWRWQ7ad+kApiPZii6ynkgln8y zsDVH2tHjSn8ocSEXBMnHWjXBomhCQsnGNDelsvSL7aEyWMDADwY5WRR94+Z2I7MwAPhBM4pX FMwUQV7g2Zm5HzzrGHdp/fUXg6HmWCZbe/VXLMs2hmisWrDMxHcO8AXLhzY1rH8Ca4Zq0Ayg8 wMKWny5WxinBj9QtaoZLtjiLHAqFphZ8CRAwTln/Tg3eE5DbONWNzt0RDHLkDMtSb4fRjs0IZ ggtsc3xPcOTJLl7Hw3w68z0zJ6AAzu7c/rZPe4xTnsI2bzRE3fVqE5srw4mXGxY9tNgGhK2O1 FP4NQ+vDelJDRyAL02kzEL9UA98ahWG3mpl+V00MPGZfhUhTU9u6EKFX4jsbYPtnpEUKGXusR s5/QCJFg46qeCe9jk8wHhIw+6kGE/c0zP3DIh7jvQuZ/p7+290ZMZvYC3Eek8wwPIomq2AS7P rwPo7jTS111kfwOmWvUiqcf0Y1IN8NrK9C7nFt5AIKQQT2f27zTkQHYze7UOzRwmtGfuaP6Rq 9NDNB4nEFxJDyvA1VQD+TVygot0tEhzMXYfFHWdbI59kbf4juqNKBpTPbLhyYlHp/T7yG9ZJF F+1Pdn8yJMh8Lf7cJGjkKJZKFMrV9b+T2S/FbTyN+e7jJvE1GW9h9KyiWIVnNAX9UgDSTby6r uqPvMe0L0Irtsz5DlVwEcbkXlgFt5KqGOQiABXqSbHGztN6m0k4qPn5vNkBOJqgpQfnGAzeE 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:199201 Archived-At: > Now I see what you mean, your idea is to run `malloc_trim(0)` only on > idle. That sounds okay with me. What I meant was a function say 'garbage-collect-and-trim' that would do the same as =E2=80=98garbage-collect=E2=80=99 but in addition run 'malloc= _trim(0)' so the person that earlier used (setq gc-cons-threshold (eval-when-compile (* 1024 1024 1024))) (run-with-idle-timer 2 t (lambda () (garbage-collect))) would now run (setq gc-cons-threshold (eval-when-compile (* 1024 1024 1024))) (run-with-idle-timer 2 t (lambda () (garbage-collect-and-trim))) instead. martin