From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#33275: 27.0.50; Image cache pruning Date: Mon, 05 Nov 2018 20:06:41 +0100 Message-ID: References: <83va5bcxxu.fsf@gnu.org> <83sh0fcx2r.fsf@gnu.org> <83o9b3cu4f.fsf@gnu.org> <83lg67crrq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541444712 20791 195.159.176.226 (5 Nov 2018 19:05:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2018 19:05:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33275@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 20:05:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJkBO-0005Is-Rt for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 20:05:06 +0100 Original-Received: from localhost ([::1]:37201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJkDV-0005E3-5V for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 14:07:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJkDK-0005Cu-9l for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:07:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJkDG-0003gt-T1 for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:07:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59591) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJkDG-0003gi-OT for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:07:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJkDG-0000Oa-9n for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Nov 2018 19:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33275 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33275-submit@debbugs.gnu.org id=B33275.15414448151508 (code B ref 33275); Mon, 05 Nov 2018 19:07:02 +0000 Original-Received: (at 33275) by debbugs.gnu.org; 5 Nov 2018 19:06:55 +0000 Original-Received: from localhost ([127.0.0.1]:35616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJkD9-0000OG-Db for submit@debbugs.gnu.org; Mon, 05 Nov 2018 14:06:55 -0500 Original-Received: from ryder.getmail.no ([84.210.184.14]:42278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJkD5-0000O1-TY for 33275@debbugs.gnu.org; Mon, 05 Nov 2018 14:06:54 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by ryder.getmail.no (Postfix) with ESMTP id 02FB862C86; Mon, 5 Nov 2018 20:06:43 +0100 (CET) Original-Received: from ryder.getmail.no ([127.0.0.1]) by localhost (ryder.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gdRvsPZ94HYt; Mon, 5 Nov 2018 20:06:41 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ryder.getmail.no (Postfix) with ESMTP id 9EF9062C87; Mon, 5 Nov 2018 20:06:41 +0100 (CET) X-Virus-Scanned: amavisd-new at ryder.getmail.no Original-Received: from ryder.getmail.no ([127.0.0.1]) by localhost (ryder.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ub5QvtFJto0G; Mon, 5 Nov 2018 20:06:41 +0100 (CET) Original-Received: from stories (cm-84.212.221.165.getinternet.no [84.212.221.165]) by ryder.getmail.no (Postfix) with ESMTPSA id 6C3A762C83; Mon, 5 Nov 2018 20:06:41 +0100 (CET) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEX+/thGAw9eUVv+/93+ //fq3LH58cKsqZr+/dP9+s7+/99hXvwTAAACQklEQVQ4jW3TMY/aMBQHcEup2pQtLJ1tiYvUCSlt VWV2qyoTQnLCdUI6Ac1NlVVjcVOWqmGrSgtnpui4tJw/ZZ8dc+QQb0rej/d37ATE0ulJMVsobd+n x2vkLieSBEGXyIYmDtZqygNTXdJzv7OQKzXDFgJChAszoNS6GWjJBNmBDT5Al4TNCMqhr4ZBcByZ O1DtJDuilAHoqz/4BNYONi2ArEszYqD88RQW0DNQnoO1nTiJWiyhiWDgCLiBEgTdlo9RXUKwXXx5 gO/YPSjjBkbQUqhsQS9vg4/KJXbnlw1N3heAJUCBLEBHMolfkfC29C0gVLgJIjnu8QvoAxQIijfQ DTme86+lXcPW0PZlKGZkNLSwNG0P/bIPK8R1HQ6yn27C63voBYalRaIpFUWGfFjERHme95aEnA+S e0oZypEPZaK8OI64yOTnj78pzaFxiDIgxUxe1hVN2hBF8W4mplJkCw0AJ2H3AUk61n9ZmonxTfJp FSFY3E7EsYaC7zlPt3q/6ts+ACQZmLCMkHDwfAxH0WzQ8yzUjHfJXNfjl+MDRHEDmUy3u3rcP4EK /iu53r3L+4V/OCsbpQGuk11HuX08rgFZ+TZ56BTwGgoXdYB0FOW6qOx78M3EzsJGMjFd6Y6unlVm j8glVRIqvdKR3tGkDTMDbKv7+g2lVFelOSoownGIxfD1v4uHkJp6jyJzVnv4OOFEhuIu/MAtJE3U Psu45DK70d+otEBRBI9rLmrGxoN7+lgAcev2CZztU8SuzsN/F61wm8Zh404AAAAASUVORK5CYII= In-Reply-To: <83lg67crrq.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Nov 2018 20:18:17 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152076 Archived-At: Eli Zaretskii writes: >> It would be reasonable if the code had asked for those images to be kept >> in memory, but it hasn't. Emacs decides that on its own without saying >> that it's doing that. > > You cannot assume anything about memory management while a Lisp > program runs. In general, if you don't have a reference to an object, you can be pretty sure that Emacs is going to garbage-collect it. If you can't assume that, then programming in Emacs Lisp becomes impossible. Fortunately that's not the case, and programming in Emacs Lisp is nice and easy. >> It'd be similarly surprising if >> >> (dolist (file (directory-files "/directory/with/many/images" t "png$")) >> (with-temp-buffer >> (insert-file-contents-literally file))) >> >> were to lead to Emacs growing uncontrollably. > > That it doesn't is just sheer luck: the way we manage buffer memory is > special. With any other Lisp object, it could well grow > uncontrollably. What other non-referenced Lisp object can realistically make Emacs grow in this way? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no