bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45200: Memory leaks: (garbage-collect) fails to reclaim memory


From: Eli Zaretskii
Subject: bug#45200: Memory leaks: (garbage-collect) fails to reclaim memory
Date: Sun, 13 Dec 2020 01:08:39 -0500

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  45200@debbugs.gnu.org
> Date: Sat, 12 Dec 2020 23:59:32 +0100
> 
> Konstantin Kharlamov <hi-angel@yandex.ru> writes:
> 
> > The loop takes 20-30 seconds for me, I think. PSS before is ≈41M, and
> > PSS after is 266.3M. That is ≈200M of memory just vanished.
> 
> I get similar results.  `M-x memory-report' shows that *Messages* and
> *Echo Area* each group to 9MB, and almost all of that is in `gap-size'.
> 
> But that's still a long way from 200MB.  Perhaps Emacs is bouncing the
> buffer area around a lot and isn't returning the data to the OS?  (Does
> Emacs ever return memory used by buffers to the OS?)

Yes, Emacs returns buffer memory to the OS when a buffer is killed.
Buffer text memory is usually obtained via mmap, and is returned when
no longer needed.  Buffer text memory is also returned to the OS when
buffers have their gap resized.

I think it isn't buffer memory that takes up most of the space here,
it's memory allocated for all the strings consed by this snippet.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]