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 Date: Tue, 11 Sep 2012 09:06:52 -0400 Message-ID: References: <504848D0.4020908@yandex.ru> <5048D826.3040103@yandex.ru> <5049C400.8070400@gmx.at> <504DB6DD.9030002@yandex.ru> <504E042E.5040100@yandex.ru> <504ECB49.4050509@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347368833 16160 80.91.229.3 (11 Sep 2012 13:07:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2012 13:07:13 +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 Tue Sep 11 15:07:15 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 1TBQBP-0000Ah-8D for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2012 15:07:15 +0200 Original-Received: from localhost ([::1]:36572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQBL-0008NT-Kc for ged-emacs-devel@m.gmane.org; Tue, 11 Sep 2012 09:07:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQBE-0008Mr-5Q for emacs-devel@gnu.org; Tue, 11 Sep 2012 09:07:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBQB8-0000Cq-OH for emacs-devel@gnu.org; Tue, 11 Sep 2012 09:07:04 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:4540) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQB8-0000Ch-Jb for emacs-devel@gnu.org; Tue, 11 Sep 2012 09:06:58 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09soXr9/2dsb2JhbABEtBGBCIIVAQEEAScvIwULCw4mEhQYDSSIHAW6CZBEA6MzgViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="198055793" Original-Received: from 108-161-122-253.dsl.teksavvy.com (HELO pastel.home) ([108.161.122.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Sep 2012 09:06:56 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id DED5E59219; Tue, 11 Sep 2012 09:06:52 -0400 (EDT) In-Reply-To: <504ECB49.4050509@yandex.ru> (Dmitry Antipov's message of "Tue, 11 Sep 2012 09:25:29 +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:153241 Archived-At: > IIUC both BLVs and frame/window buffer lists aren't shared. So, marking > traversal which sees an owner symbol/frame/window for the first time > sees these objects for the first time too (thus mark them correctly). > And even we change buffer list or BLV so the marked object becomes > unreachable, we just create some floating garbage which survives current > GC but will be reclaimed during the next one. The part where it gets less obvious is that swap_in_global_binding doesn't only modify the BLV struct but also the C variable pointed to by the `fwd' field and that variable is marked from elsewhere (staticpro, for example). As I said, I still think it's safe because we know the values we assign there will be marked "real soon now" (via the "mark_object (blv->defcell)" for example). BTW, the "FIXME: make sure it's safe during GC." you placed before the call to swap_in_global_binding should be turned into a "BEWARE: this is called during GC, so make sure we ..." placed within swap_in_global_binding. >> I don't see any reason to remove the previous comment since the change >> doesn't affect its validity. > IIUC this comment is partially invalid since lisp.h comment says that > Lisp_Buffer_Local_Value can't be forwarded to buffer or kboard object > (and this is really so). Good point, yes, thanks for updating the comment. Stefan