Subject: Re: bug#43389: 28.0.50; Emacs memory leaks

From: Eli Zaretskii <[email-masked]>
Date: Wed, 18 Nov 2020 17:03:26 +0200

> Date: Wed, 18 Nov 2020 00:45:48 +0300
> From: Jean Louis <[email-masked]>
> Cc: [email-masked], [email-masked], [email-masked],
>   [email-masked], [email-masked], [email-masked]
> 
> Maybe some simple new and automatic function could be temporarily
> included to spit errors to output on what is Emacs doing when it
> starts swapping (if it is swapping), then such errors could at least
> be captured in a file even if I have to reboot computer.

Emacs doesn't know when the system starts swapping.  But you can write
a function that tracks the vsize of the Emacs process, using emacs-pid
and process-attributes, and displays some prominent message when the
vsize increments become larger than some threshold, or the vsize
itself becomes larger than some fixed number.  Then run this function
off a timer that fires every 10 or 15 seconds, and wait for it to tell
you when the fun starts.