From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#56546: 29.0.50; unbounded RAM comsumption when displaying images Date: Thu, 14 Jul 2022 12:15:03 +0200 Message-ID: <878rowatlk.fsf@gnus.org> References: <87cze84gst.fsf@mail.jao.io> <8335f4uu17.fsf@gnu.org> <83zghctekc.fsf@gnu.org> <87r12onkhz.fsf@gnus.org> <83leswt5q1.fsf@gnu.org> <87mtdcnj7u.fsf@gnus.org> <87h73kau8j.fsf@gnus.org> <83k08gt37n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20474"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: mail@jao.io, 56546@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 14 12:19:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBvwG-0004zf-Bb for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 12:19:20 +0200 Original-Received: from localhost ([::1]:43868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBvwD-0006Cs-NW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 06:19:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBvt5-0003ac-8f for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 06:16:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBvt4-0005x1-32 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 06:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBvt3-0003XD-VE for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 06:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2022 10:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56546 X-GNU-PR-Package: emacs Original-Received: via spool by 56546-submit@debbugs.gnu.org id=B56546.165779371513509 (code B ref 56546); Thu, 14 Jul 2022 10:16:01 +0000 Original-Received: (at 56546) by debbugs.gnu.org; 14 Jul 2022 10:15:15 +0000 Original-Received: from localhost ([127.0.0.1]:48940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBvsJ-0003Vl-9B for submit@debbugs.gnu.org; Thu, 14 Jul 2022 06:15:15 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:33382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBvsH-0003VQ-Pt for 56546@debbugs.gnu.org; Thu, 14 Jul 2022 06:15:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=GQ4SgYzKaHep0TV2nyybfHeQSklzyjCMRN2HKHfdAlA=; b=Oqy3flKlZpfBEYi2qVv8f7y/WY HXF5V0HmSwpy+w1yVi4aaiDMdPVLpiNVgwL9fUazUpFoGbgphWrvE/qHki/b3q7tWahZmQgW3g0jm /UiC/cQUwDZ02tc7LFg8wRkfnAkX82IquAyCT+sWp1pG9koCou7QmX9vE+tXLrP/+6ko=; Original-Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oBvs8-0000q0-EW; Thu, 14 Jul 2022 12:15:06 +0200 In-Reply-To: <83k08gt37n.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 14 Jul 2022 13:10:04 +0300") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEVsdXsdFBTh08v/ //8dPTZQAAAAAWJLR0QDEQxM8gAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB+YHDgoCB//z i+sAAAFbSURBVCjPTdG9bsIwEAfwAxUJeaJRIiGmlgn5KRIEQzOFyNehT1DxFFEm5KkdWJiCpUru /yl751BElA//ch92HJoxE02YuSEifZQKN8LRI3IF39Kenh+Q0lT3GuaS0qsRTQJXcu0P7g5X0i3S yIl4g2Nugd0jtMZxkxA1cqiWcm9Cl2rKldy36NKklRkKPl7mE8H+bRsLrrOoKGg6zHibDVrjqL9O uPZgrdn0seIaUeDyjYl7wa+CjJcGH1ONcGlxKjRtJtglNJkdtIHBlXkBRF3VGq/sOttDGjjyPy7v jIemtb54zwfrQ9oqe26ziIum8WHN7SoGk9KqwMZgOCbwoqgt4meC+26WMosF7Znzr7wXACS/se2p g4dA9rwOp5cxEhtZsF8DQYB5UQMWehBwFuj7BJ0EYwNFxHiQFYRxHGjqC4vQjxiMfDaN7Ug+vJah 0fYELxH843RH+ANNCdcrFLJgDgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNy0xNFQxMDowMjow NyswMDowMGc4rDgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDctMTRUMTA6MDI6MDcrMDA6MDAW ZRSEAAAAAElFTkSuQmCC X-Now-Playing: Mimi Goese and Ben Neill's _Life You Are_: "Ocean Rain" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236980 Archived-At: Eli Zaretskii 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