From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Reachable killed buffers [Was: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109890: Do not mark objects from deleted buffers, windows and frames] Date: Mon, 10 Sep 2012 09:25:58 -0400 Message-ID: References: <504848D0.4020908@yandex.ru> <5048D826.3040103@yandex.ru> <5049C400.8070400@gmx.at> <504DB6DD.9030002@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347283586 12413 80.91.229.3 (10 Sep 2012 13:26:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2012 13:26:26 +0000 (UTC) Cc: martin rudalics , emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 10 15:26:26 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TB40M-00016Q-4x for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2012 15:26:22 +0200 Original-Received: from localhost ([::1]:43417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB40I-0002ij-J8 for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2012 09:26:18 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB40A-0002Zf-7V for emacs-devel@gnu.org; Mon, 10 Sep 2012 09:26:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TB400-0004Ud-9d for emacs-devel@gnu.org; Mon, 10 Sep 2012 09:26:10 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:62400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TB400-0004UQ-5K for emacs-devel@gnu.org; Mon, 10 Sep 2012 09:26:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu0+4rxAc/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYHCxQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="197958867" Original-Received: from 184-175-16-28.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.28]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Sep 2012 09:25:59 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id E1ECB5923B; Mon, 10 Sep 2012 09:25:58 -0400 (EDT) In-Reply-To: <504DB6DD.9030002@yandex.ru> (Dmitry Antipov's message of "Mon, 10 Sep 2012 13:46:05 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153214 Archived-At: > I found two places where the killed buffer may survive for a while > and so create some unneeded pressure to GC: > 1) 'where' slot of Lisp_Buffer_Local_Value, which has local_if_set 0. > When the buffer is killed, swap_out_buffer_local_variables can't see > this BLV's symbol because it's not in buffer's local_var_alist. > Shouldn't we call to swap_in_global_binding for such an "orphaned" BLVs? Hmm... how can we find those? I guess we could handle it during GC when we mark the BLV. > 2) 'prev_buffers' and 'next_buffers' of struct window. When the buffer > is killed, replace_buffer_in_windows should remove it from these lists; > but window-list-1 returns only live windows, so we may end up with > dead window with a long list of killed buffers referenced from > prev_buffers and/or next_buffers. I think here as well the problem is how to find those windows, and again I think the easiest is to do it during GC. Stefan