[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: module GC bug
From: |
Marius Vollmer |
Subject: |
Re: module GC bug |
Date: |
Mon, 01 Aug 2005 03:20:41 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Han-Wen Nienhuys <address@hidden> 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)
#<module b7b859b0>
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
- Re: module GC bug,
Marius Vollmer <=
Re: module GC bug, Han-Wen Nienhuys, 2005/08/01
Re: module GC bug, Han-Wen Nienhuys, 2005/08/04