GNU bug report logs - #79023
30.1.90; Suspicion of memory leak on internal_redisplay (MacOS)

Previous Next

Package: emacs;

Reported by: Przemysław Alexander Kamiński <przemyslaw <at> kaminski.se>

Date: Tue, 15 Jul 2025 07:14:01 UTC

Severity: normal

Found in version 30.1.90

Full log


View this message in rfc822 format

From: Rudolf Adamkovič <rudolf <at> adamkovic.org>
To: Eli Zaretskii <eliz <at> gnu.org>, Przemysław Alexander Kamiński <przemyslaw <at> kaminski.se>
Cc: 79023 <at> debbugs.gnu.org
Subject: bug#79023: 30.1.90; Suspicion of memory leak on internal_redisplay (MacOS)
Date: Tue, 22 Jul 2025 01:33:45 +0200
[Message part 1 (text/plain, inline)]
Rudolf Adamkovič <rudolf <at> adamkovic.org> writes:

> [...], and indeed, and the code above resulted in 1098 allocations of
> 4.72 MB, totaling ~5.18 GB, and they are all like these: [...]

Okay, I could not let go before sleep and investigated further.  See the
attached patch.  With it, the never-freed 5.18 GB of RAM is fixed for:

(dotimes (x 1000)
  (let ((frame (make-frame-command)))
    (sleep-for 0.01)
    (delete-frame frame)))

P.S. The remaining 5.22 - 5.13 ~= 100 MB is wasted due to bugs elsewhere.

Rudy
[0001-NS-Release-EmacsView-and-EmacsLayer-when-deallocatin.patch (text/x-patch, attachment)]
[Message part 3 (text/plain, inline)]
-- 
"Logic is a science of the necessary laws of thought, without which no
employment of the understanding and the reason takes place."
--- Immanuel Kant, 1785

Rudolf Adamkovič <rudolf <at> adamkovic.org> [he/him]
http://adamkovic.org

This bug report was last modified today.

Previous Next


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