On 16 Jul 2025, at 13:08, Eli Zaretskii wrote: >> From: Przemysław Alexander Kamiński >> >> Cc: 79023@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