GNU bug report logs -
#79023
30.1.90; Suspicion of memory leak on internal_redisplay (MacOS)
Previous Next
Full log
Message #32 received at 79023 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 16 Jul 2025, at 13:08, Eli Zaretskii wrote:
>> From: Przemysław Alexander Kamiński
>> <przemyslaw <at> kaminski.se>
>> Cc: 79023 <at> debbugs.gnu.org
>> Date: Tue, 15 Jul 2025 15:52:20 +0200
>>
>> I've done some extra testing, since I wouldn't be surprised if some
>> release on a string was missing or something. On a fresh instance
>> blinking cursor is enough to raise memory usage. 10mb over 4.5mb and
>> garbage- didn't releaes memory.
>
> Please describe this recipe in more detail, starting from "emacs -Q",
> so others could try repeating it. Also, please describe how you
> measure the memory leaks and what are the numbers you see.
>
Unfortunatelly there's nothing more I can do, Instruments is strictly
GUI app. All text has to be extracted manually. I know it's probably the
worst way to do, but I recorded example session with `emacs -Q`.
https://www.youtube.com/watch?v=_korzyoMXfY
It'd be nice if someone smarter than me and more experienced in MacOS
system programming took a look on this, my current line is to have a
build pipeline and throw different ideas until I can find something that
works.
>> I think I can reproduce test case and even think what might be the
>> cause, as I looked around MacOS code for couple of minutes.
>
> Please do, and thanks.
I've been able to reproduce by using blinking cursor (setq
blink-cursor-blinks 0 blink-cursor-interval 0.1).
Attached patch seemed to decrease number of allocations and leaks but
it's not enough to make a dent.
Best,
Przemysław Alexander Kamiński
[Message part 2 (text/html, inline)]
[memleak.patch (text/plain, attachment)]
This bug report was last modified 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.