unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: mail@jao.io, 56546@debbugs.gnu.org
Subject: bug#56546: 29.0.50; unbounded RAM comsumption when displaying images
Date: Thu, 14 Jul 2022 12:15:03 +0200	[thread overview]
Message-ID: <878rowatlk.fsf@gnus.org> (raw)
In-Reply-To: <83k08gt37n.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Jul 2022 13:10:04 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

> Don't we allocate memory for the cached stuff?  If so, we could count
> the bytes there, and record them in the cache itself.

No, we just call the gif/webp functions, and they allocate stuff on
their own.  For webp, we do know the size of the main data blob, but not
for GIF -- we just call DGifOpenFileName+DGifSlurp, and looking over the
documentation, there doesn't seem to be any way to get it to cough up
how much data it allocated.

In the non-file case, we know the size of the data blob, and I guess we
could just see how big the GIF file is in the DGifOpenFileName case, and
assume that it allocates memory for the entire file.  (Which may or may
not be true -- perhaps it uses mmap into the file instead, or
whatever...)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2022-07-14 10:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-14  1:35 bug#56546: 29.0.50; unbounded RAM comsumption when displaying images Jose A. Ortega Ruiz
2022-07-14  5:45 ` Eli Zaretskii
2022-07-14  6:04   ` Eli Zaretskii
2022-07-14  8:53     ` Lars Ingebrigtsen
2022-07-14  9:15       ` Eli Zaretskii
2022-07-14  9:20         ` Lars Ingebrigtsen
2022-07-14 10:01           ` Lars Ingebrigtsen
2022-07-14 10:10             ` Eli Zaretskii
2022-07-14 10:15               ` Lars Ingebrigtsen [this message]
2022-07-14 12:23   ` Jose A. Ortega Ruiz
2022-07-14 16:59 ` Lars Ingebrigtsen
2022-07-14 17:26   ` Eli Zaretskii
2022-07-14 17:51   ` Glenn Morris
2022-07-14 18:08     ` Lars Ingebrigtsen
2022-07-15 23:42   ` Jose A. Ortega Ruiz
2022-07-16 10:37     ` Lars Ingebrigtsen

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=878rowatlk.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=56546@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=mail@jao.io \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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