From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: Re: frames vs. weak hash tables and garbage collection Date: Fri, 28 Sep 2007 12:27:20 -0400 Message-ID: References: <86wsvdvmkb.fsf@macs.hw.ac.uk> <86y7fru45n.fsf@macs.hw.ac.uk> <868x6u1g8x.fsf@macs.hw.ac.uk> <874phgo5l2.fsf@ambire.localdomain> <86k5qazvm4.fsf@macs.hw.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1190996864 13495 80.91.229.12 (28 Sep 2007 16:27:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2007 16:27:44 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Joe Wells Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 28 18:27:40 2007 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IbIgb-0006qy-UD for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Sep 2007 18:27:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IbIgY-0002Me-2t for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Sep 2007 12:27:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IbIgW-0002MV-9a for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2007 12:27:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IbIgV-0002MB-A3 for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2007 12:27:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IbIgV-0002M8-5o for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2007 12:27:23 -0400 Original-Received: from tomts5.bellnexxia.net ([209.226.175.25] helo=tomts5-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IbIgU-0008AA-Jr for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2007 12:27:22 -0400 Original-Received: from pastel.home ([74.12.208.240]) by tomts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070928162721.WMFL1592.tomts5-srv.bellnexxia.net@pastel.home> for ; Fri, 28 Sep 2007 12:27:21 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id DFA067F80; Fri, 28 Sep 2007 12:27:20 -0400 (EDT) In-Reply-To: <86k5qazvm4.fsf@macs.hw.ac.uk> (Joe Wells's message of "Fri\, 28 Sep 2007 15\:56\:51 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-Detected-Kernel: Solaris 8 (1) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:16645 Archived-At: > Your explanation doesn't show up in gnu.emacs.bug either. Can you > please resend? Hmm... not sure what's going on. There's not much more to send. > By the way, great work in tracking the problem down! Thanks. > I suppose this means frames are never being garbage collected at all? Not at all: the array of recent input events (as the name implies) only keep recent events, so after some number of events (300, more precisely) the reference disappears, making it possible to collect the frame. The reference from `values' is just due to the fact that you run `reproduce-bug' from M-: and that its return value contains the frame, so it's a rather unusual circumstance. But it seems that `values' is never flushed, so it is a source of leaks. We should probably fix it (I'd remove it since almost noone even knows that it exists, but I guess Richard uses it once in a blue moon). Stefan