GNU bug report logs - #45200
Wishlist: There should be a `malloc-trim' function

Previous Next

Package: emacs;

Reported by: Konstantin Kharlamov <hi-angel <at> yandex.ru>

Date: Sat, 12 Dec 2020 18:44:02 UTC

Severity: wishlist

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Konstantin Kharlamov <hi-angel <at> yandex.ru>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: carlos <at> redhat.com, fweimer <at> redhat.com, dj <at> redhat.com, 45200 <at> debbugs.gnu.org
Subject: bug#45200: [PATCH] Force Glibc to free the memory freed
Date: Wed, 3 Feb 2021 16:14:54 +0100
> 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 ‘garbage-collect’ 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





This bug report was last modified 3 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.