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

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

Re: Emacs eats up my memory while viewing images


From: Eli Zaretskii
Subject: Re: Emacs eats up my memory while viewing images
Date: Thu, 08 Jun 2017 18:09:14 +0300

> From: Danny YUE <sheepduke@gmail.com>
> Date: Thu, 08 Jun 2017 19:58:03 +0800
> 
> I was viewing some (well, lots of) old images using image+ in Emacs.
> Then I noticed that it opens new image slower and slower.
> I ran command `free -h` and noticed that my memory was almost totally
> consumed.
> Then I killed Emacs and memory consumption dropped to normal level.
> 
> I suspect there is something wrong with it, because when I press "N" for
> `image-next-file`, the old image file is removed from buffer list, thus
> the memory consumed by it *should* be released...

The memory isn't released immediately because Emacs caches images for
better performance.  And even if Emacs does free the memory used for
the image and its buffer, it doesn't necessarily return that memory to
the OS; that depend on the build and the OS you are using.

Try the command "M-x clear-image-cache".  If that helps, you may wish
to customize your value of image-cache-eviction-delay.



reply via email to

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