Subject: bug#43389: 28.0.50; Emacs memory leaks using hard disk all time

From: Jean Louis <[email-masked]>
Date: Mon, 23 Nov 2020 21:33:09 +0300

* Eli Zaretskii <[email-masked]> [2020-11-23 18:46]:
> I think I described how to write an Emacs function that you could use
> to watch the vsize of the Emacs process and alert you to it being
> above some threshold.

Yes I will do.

I will use this to inform you:

(defun good-bye ()
  (interactive)
  (let* ((garbage (garbage-collect))
	 (size 0)
	 (buffers-size (dolist (buffer (buffer-list) size)
			(setq size (+ size (buffer-size buffer)))))
	 (uptime (emacs-uptime))
	 (pid (emacs-pid))
	 (file (format "~/tmp/emacs-session-%s.el" pid))
	 (list (list (list 'uptime uptime) (list 'pid pid)
		     (list 'garbage garbage) (list 'buffers-size buffers-size))))
    (with-temp-file file
      (insert (prin1-to-string list)))
    (message file)))