From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56546: 29.0.50; unbounded RAM comsumption when displaying images Date: Thu, 14 Jul 2022 08:45:24 +0300 Message-ID: <8335f4uu17.fsf@gnu.org> References: <87cze84gst.fsf@mail.jao.io> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17476"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56546@debbugs.gnu.org To: "Jose A. Ortega Ruiz" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 14 07:55:38 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 1oBrp4-0004LO-7u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 07:55:38 +0200 Original-Received: from localhost ([::1]:43402 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBrp1-0003yh-9Z for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 01:55:36 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47040) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBrfl-0006Yw-Ro for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 01:46:09 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBrfl-00065D-JH for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 01:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBrfl-0004jT-I5 for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 01:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2022 05:46: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.165777753918161 (code B ref 56546); Thu, 14 Jul 2022 05:46:01 +0000 Original-Received: (at 56546) by debbugs.gnu.org; 14 Jul 2022 05:45:39 +0000 Original-Received: from localhost ([127.0.0.1]:48419 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBrfP-0004ir-Fd for submit@debbugs.gnu.org; Thu, 14 Jul 2022 01:45:39 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34082) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBrfM-0004id-EA for 56546@debbugs.gnu.org; Thu, 14 Jul 2022 01:45:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBrfG-00062o-VL; Thu, 14 Jul 2022 01:45:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=vuwnGn4C1O1jstjE23UZ58ZcUPDOkqRoCxtAG8W3sdQ=; b=r5XAkiwK9WJr IRmJTkTTqA4IVRZ1/KMpmhCWD+JltM+jZ3fVs0pM2j0mUvp4DN6WAfhPTponB35pMwLpReAw/zR+p YOAJgszyINcP1us/cdrROoBvL0GzaECXNGQ475EuzAAQUX8PWoDGsQYAgaklnXDxMlOgLTP44ncC8 zTReJEbYyyyyT9AkgpoPx3/rChx2KOtz5JtbaTUhrd0/5JrHeBoTUlO5T4GzLYKdNOCaQgR/akvbY 9KgVLCR4S6NT6/UuxNnzJOUtaHUqWjjovWFUGbNRqsYvNxRFdUIbisMWIEi2xysoPuIKt0ySWTeD6 zmUHd4HTIJXT5hZ06PewJQ==; Original-Received: from [87.69.77.57] (port=4472 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBrfG-0006uN-0u; Thu, 14 Jul 2022 01:45:30 -0400 In-Reply-To: <87cze84gst.fsf@mail.jao.io> 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:236953 Archived-At: > From: "Jose A. Ortega Ruiz" > Date: Thu, 14 Jul 2022 02:35:46 +0100 > > > It seems to be easy to make emacs (under X) to consume more and more > RAM, which is never released, by making it display images. A extreme > (in my experience) case is animated GIFs, try: > > - emacs -Q > - M-x eww RET https://xenodium.com/emacs-zones-to-lift-you-up/ > - RAM consumption grows to ~600Mb > - R (redisplay page): RAM grows to ~1100Mb > - R (redisplay page): RAM grows to ~1752Mb > - R (redisplay page): RAM grows to ~2222Mb > - rinse and repeat: RAM never goes down > - (image-cache-size) reports a modest 82Mb > - Kill buffer: high RAM consumption is still at its maximum, even > after (image-cache-size) goes to 0 Run some utility that displays the memory-map of an application, and you will see that most of that memory is free for use. Emacs just didn't release it to the OS, but kept it in the memory pages allocated to the process, for future allocations. The strategy for releasing memory to the OS is in glibc, not under our control. Last time we talked with glibc developers, they maintained that this is the expected and correct behavior.