From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: module GC bug Date: Mon, 01 Aug 2005 03:20:41 +0300 Message-ID: <878xzma4o6.fsf@zagadka.de> References: <42A8D188.20007@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1122892313 28178 80.91.229.2 (1 Aug 2005 10:31:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 1 Aug 2005 10:31:53 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Aug 01 12:31:51 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DzXZG-0004E4-2t for guile-devel@m.gmane.org; Mon, 01 Aug 2005 12:30:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DzXbt-0006pa-3d for guile-devel@m.gmane.org; Mon, 01 Aug 2005 06:33:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DzOJR-0004e4-Km for guile-devel@gnu.org; Sun, 31 Jul 2005 20:37:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DzOJM-0004a7-9b for guile-devel@gnu.org; Sun, 31 Jul 2005 20:37:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DzOJK-0004YT-NR for guile-devel@gnu.org; Sun, 31 Jul 2005 20:37:42 -0400 Original-Received: from [213.243.153.35] (helo=smtp2.pp.htv.fi) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DzOEo-00042O-Cr for guile-devel@gnu.org; Sun, 31 Jul 2005 20:33:02 -0400 Original-Received: from zagadka.ping.de (cs181072157.pp.htv.fi [82.181.72.157]) by smtp2.pp.htv.fi (Postfix) with SMTP id 4F419296B75 for ; Mon, 1 Aug 2005 03:20:38 +0300 (EEST) Original-Received: (qmail 31247 invoked by uid 1000); 1 Aug 2005 00:20:41 -0000 Original-To: Han-Wen Nienhuys In-Reply-To: <42A8D188.20007@xs4all.nl> (Han-Wen Nienhuys's message of "Fri, 10 Jun 2005 01:32:24 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:5179 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:5179 Han-Wen Nienhuys writes: > I've found a memory leak in GUILE. > > The contents of modules are not garbage collected. I believe this is fixed in CVS HEAD now in the 'proper' way: guile> (define g (make-guardian)) guile> (g (make-module)) guile> (gc) guile> (g) # The fix consists of storing procedure properties in a weak key hashtable (as you did), and fixing weak hashtables so that cycles from the value back to the key get properly collected. I think this change is a too large to go into 1.6, tho. Is there a workaround that you could put into your code, such as (set-procedure-property! (module-eval-closure M) 'module #f) in an appropriate place? -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel