Page 1 of 1

AutoHotkey.Interop SendPipeMessage() Eats 4GB RAM

Posted: 16 Jan 2023, 19:49
by akaza_dorian
It's basically here: https://github.com/AkazaRenn/FruitLanguageSwitcher/blob/dev/minimalist/Core/Hotkey.cs

Regularly the compiled program consumes like 80MB RAM, but once either of the hotkeys that involves SendPipeMessage is triggered, the memory usage bumps up to 4GB for about 10 sec, then get back to normal. The hotkey function will be unavailable during that time. You can refer to https://github.com/AkazaRenn/FruitLanguageSwitcher/blob/dev/minimalist/Core/Hotkey/CapsLock.ahk for the hotkey. Just hitting & releasing capslock should trigger it.

Is it something I should expect to happen to everyone, or an issue on my own side?

Thanks in advance!

Re: AutoHotkey.Interop SendPipeMessage() Eats 4GB RAM

Posted: 16 Jan 2023, 20:54
by akaza_dorian
Seems like a born nature of the pipe implementation, I've tried another approach which worked quite well: https://github.com/amazing-andrew/AutoHotkey.Interop/issues/9#issuecomment-314519379