From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludovic.courtes@laas.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: port-for-each vs lazy sweep Date: Mon, 20 Aug 2007 10:42:07 +0200 Organization: LAAS-CNRS Message-ID: <87hcmuha1s.fsf@laas.fr> References: <878x88pbcc.fsf@zip.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1187599259 26468 80.91.229.12 (20 Aug 2007 08:40:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 20 Aug 2007 08:40:59 +0000 (UTC) Cc: guile-devel@gnu.org To: Kevin Ryde Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Aug 20 10:40:56 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IN2og-0001yx-B6 for guile-devel@m.gmane.org; Mon, 20 Aug 2007 10:40:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IN2og-0002bJ-JQ for guile-devel@m.gmane.org; Mon, 20 Aug 2007 04:40:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IN2od-0002bE-DP for guile-devel@gnu.org; Mon, 20 Aug 2007 04:40:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IN2oc-0002b1-Br for guile-devel@gnu.org; Mon, 20 Aug 2007 04:40:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IN2oc-0002ay-6i for guile-devel@gnu.org; Mon, 20 Aug 2007 04:40:50 -0400 Original-Received: from laas.laas.fr ([140.93.0.15]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IN2oa-0003Ai-Jp for guile-devel@gnu.org; Mon, 20 Aug 2007 04:40:48 -0400 Original-Received: from messiaen.laas.fr (messiaen [IPv6:2001:660:6602:0:230:65ff:fed4:9d20]) by laas.laas.fr (8.13.8/8.13.8) with SMTP id l7K8eksm000481; Mon, 20 Aug 2007 10:40:46 +0200 (MEST) Original-Received: by messiaen.laas.fr (sSMTP sendmail emulation); Mon, 20 Aug 2007 10:42:08 +0200 X-URL: http://www.laas.fr/~lcourtes/ X-Revolutionary-Date: 3 Fructidor an 215 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEB1F5364 X-PGP-Key: http://www.laas.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 821D 815D 902A 7EAB 5CEE D120 7FBA 3D4F EB1F 5364 X-OS: powerpc-unknown-linux-gnu Mail-Followup-To: Kevin Ryde , guile-devel@gnu.org In-Reply-To: <878x88pbcc.fsf@zip.com.au> (Kevin Ryde's message of "Sun\, 19 Aug 2007 11\:22\:27 +1000") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Spam-Score: 0.306 () MAILTO_TO_SPAM_ADDR,NO_RELAYS X-Scanned-By: MIMEDefang at CNRS-LAAS on IPv6:2001:660:6602::2 X-Detected-Kernel: Solaris 10 (beta) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6707 Archived-At: Hi, Kevin Ryde writes: > I suppose either port-for-each should ignore ports which are unmarked > and unswept; or the gc should sweep the port table entries immediately > instead of lazily. Neither sounds pretty, but the latter might be safer > than letting zombies remain in the port table. In the latter case, GC would modify the port table, potentially beneath the feet of functions that iterate over it, or that cached indices within the table, things like that. So the former would seem safer, wouldn't it? > I suspect for instance > `flush-all' could suffer the same problem if it does a callback to a > soft port flush function (or a C code ptob flush func if that somehow > provoked some sweeping). Indeed. > (This got me wondering why there's a port table anyway, instead of > independent objects with say a weak hash table for the "list of all > ports" needed by port-for-each and flush-all. Historical reasons I > suppose.) Why don't we remove it in HEAD? :-) Furthermore, `port-for-each' is questionable from a security viewpoint, and I'm not sure it's very useful either (I haven't checked its current uses, though). Thanks, Ludovic. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel