From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: DJ Delorie Newsgroups: gmane.emacs.bugs Subject: bug#45200: [PATCH] Force Glibc to free the memory freed Date: Wed, 03 Feb 2021 16:00:38 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2778"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fweimer@redhat.com, carlos@redhat.com, monnier@iro.umontreal.ca, hi-angel@yandex.ru, 45200@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 03 22:02:42 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 1l7PIQ-0000bt-IQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Feb 2021 22:02:42 +0100 Original-Received: from localhost ([::1]:44574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7PIP-0006ol-Bn for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 03 Feb 2021 16:02:41 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7PHm-0006mT-Lz for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2021 16:02:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55679) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7PHm-0002FQ-Da for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2021 16:02:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l7PHm-0004Kq-A6 for bug-gnu-emacs@gnu.org; Wed, 03 Feb 2021 16:02:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: DJ Delorie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Feb 2021 21:02: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.161238607316609 (code B ref 45200); Wed, 03 Feb 2021 21:02:02 +0000 Original-Received: (at 45200) by debbugs.gnu.org; 3 Feb 2021 21:01:13 +0000 Original-Received: from localhost ([127.0.0.1]:38992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7PGz-0004Jp-1O for submit@debbugs.gnu.org; Wed, 03 Feb 2021 16:01:13 -0500 Original-Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7PGv-0004Jf-CQ for 45200@debbugs.gnu.org; Wed, 03 Feb 2021 16:01:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612386068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=DnJ8/V7WFhL6/99DkI2l5CyQv1XZuy9/GwykyGVbPn8=; b=bCHSpeabz8h3lgYge5MWqLlEIEzFJw2xjnHMryXdlbxbI2GBsyJJTZGZwxHbtz0rd4a8Z1 dD1JNG5ZjHRDkVrKCpeYsv/DkqEn5UbPtK2rGYvwmRey8Vk2l0RyZM2qj0V+8hsxQaGFvE B+RqitpujZHzuGv6nUq2zd4frygqm9Q= Original-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-15-z5n2GEt6MFm7RkoZRJG4bw-1; Wed, 03 Feb 2021 16:01:06 -0500 X-MC-Unique: z5n2GEt6MFm7RkoZRJG4bw-1 Original-Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A77D6869ED9; Wed, 3 Feb 2021 21:00:40 +0000 (UTC) Original-Received: from greed.delorie.com (ovpn-114-77.rdu2.redhat.com [10.10.114.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E79660BFA; Wed, 3 Feb 2021 21:00:40 +0000 (UTC) Original-Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.14.7/8.14.7) with ESMTP id 113L0cEK002011; Wed, 3 Feb 2021 16:00:38 -0500 In-Reply-To: <838s853p99.fsf@gnu.org> (message from Eli Zaretskii on Wed, 03 Feb 2021 21:49:54 +0200) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dj@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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:199248 Archived-At: Eli Zaretskii writes: > Which other knobs are there that aren't deprecated and could disappear > without a warning, though? We used to use some knobs in the past, > then one day we were told we should stop because those knobs will no > longer be available. There's a whole section in the glibc manual on "Memory Allocation Tunables", which is the "new" way to do this. "man mallopt" is the other way. Using these you could, for example, disable the tcache and fastbins completely and see how that works for you. Or limit the number of arenas. Or let smaller allocations go directly to mmap(). There are some environment variables which affect malloc, but we're trying to get rid of those. Maybe in ten or twenty years we'll come up with some better way, but that's the future's problem ;-)