bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45200: [PATCH] Force Glibc to free the memory freed


From: martin rudalics
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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]