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


Message #80 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Przemysław Alexander Kamiński
 <przemyslaw <at> kaminski.se>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 30.1.90; Suspicion of memory leak on internal_redisplay (MacOS)
Date: Mon, 04 Aug 2025 20:10:03 +0200
[Message part 1 (text/plain, inline)]
I'm attaching the patch that looks promising (from local instrumentation):

Changes:
- render_block mechanism when doing "inner" run loops
- don't CGContextFlush manually (documentation recommends to leave
  window renderer to handle that)
- some small fixes in releases (toolbar)
- niling Emacs' frame struct on window dealloc - it should be garbagged
  but it seems something is still attached to the ref and cannot be GCed

Known issues:
- Can't get resizing as it's chicken-and-egg problem - drag redraws and
redraw reads on socket (which blocks redraws)

Other remarks:
- Increasing number of buffers in "double buffering" prevents leaks and
  memory allocation, but I didn't include it in the patch (e.g. not
  array of 2, but array of 4 or 6)

Best,
Przemysław Alexander Kamiński

[ns.patch (text/x-patch, attachment)]

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.