From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Han-Wen Nienhuys Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Marking weak alist vectors Date: Wed, 09 Nov 2005 19:36:25 +0100 Message-ID: <437241A9.105@xs4all.nl> References: <87y83z3vh5.fsf@laas.fr> <4371CF46.4010708@xs4all.nl> <87y83xkcq6.fsf@laas.fr> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1131562060 10101 80.91.229.2 (9 Nov 2005 18:47:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 9 Nov 2005 18:47:40 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed Nov 09 19:47:40 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EZuwB-0003NB-MG for guile-devel@m.gmane.org; Wed, 09 Nov 2005 19:44:47 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZuwA-0004NO-NN for guile-devel@m.gmane.org; Wed, 09 Nov 2005 13:44:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EZuvS-0004A6-2q for guile-devel@gnu.org; Wed, 09 Nov 2005 13:44:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EZuvP-00049A-VU for guile-devel@gnu.org; Wed, 09 Nov 2005 13:44:00 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EZuvP-00048t-8u for guile-devel@gnu.org; Wed, 09 Nov 2005 13:43:59 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EZuvP-0002gM-5M for guile-devel@gnu.org; Wed, 09 Nov 2005 13:43:59 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EZurK-0000oI-Tt for guile-devel@gnu.org; Wed, 09 Nov 2005 19:39:46 +0100 Original-Received: from muurbloem.xs4all.nl ([213.84.26.127]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Nov 2005 19:39:46 +0100 Original-Received: from hanwen by muurbloem.xs4all.nl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Nov 2005 19:39:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: guile-devel@gnu.org Original-Lines: 36 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: muurbloem.xs4all.nl User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en In-Reply-To: <87y83xkcq6.fsf@laas.fr> 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:5384 Archived-At: Ludovic Courtès wrote: >>Does your patch solve the problem that cyclical structures (values that >>point back to keys) should also be GC-ed? > > > I guess you're talking about cyclical structures in doubly-weak alist > vectors. If so, it apparently does since if both WEAK_VALUES and > WEAK_KEYS are false in both functions, then neither the key nor the > value will ever be marked by those functions. Actually, I was talking about tables with only weak keys, but strong values. > 1. The tests in `weaks.test' are broken in several ways, not only > because "we have no way of knowing for certain that the object is > really dead" as stated there. You can detect whether objects died; just generate a lot of them, and see what happens to the stats the output of (gc-live-object-stats) after a few GCs. > 3. Given the level of non-determinism I've been able to observe, I'm > afraid leaks are causing us difficulties. For instance, while > testing weakly-key alist vectors "by hand" in a REPL, it occurred to > me that the weak-key pair would reliably die, *unless* the hash > table was written (I mean using `write'): Curious; why does this happen? > That's the whole point of the test: object properties are used because > they involve weak hash tables. In that case, I'm missing the point completely; why do you need this functionality? -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel