unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs eats up my memory while viewing images
Date: Thu, 08 Jun 2017 18:09:14 +0300	[thread overview]
Message-ID: <837f0m8qjp.fsf@gnu.org> (raw)
In-Reply-To: <87shjau1x0.fsf@gmail.com> (message from Danny YUE on Thu, 08 Jun 2017 19:58:03 +0800)

> 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.



  parent reply	other threads:[~2017-06-08 15:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-08 11:58 Emacs eats up my memory while viewing images Danny YUE
2017-06-08 14:54 ` Alexis
2017-06-08 15:54   ` Danny YUE
2017-06-08 15:09 ` Eli Zaretskii [this message]
2017-06-08 16:06   ` Danny YUE
2017-06-08 16:14     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=837f0m8qjp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).