[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: module GC bug

From: Han-Wen Nienhuys
Subject: Re: module GC bug
Date: Thu, 04 Aug 2005 11:26:22 +0200
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Marius Vollmer wrote:
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'm not convinced that you have fixed the original problem. I've CVS upped GUILE, and now LilyPond is again soaring to 750mb memory footprints while processing many trivial files. The problem is a little more acute, since I've upped the GC yield for performance reasons.

And... this version of Lily even has the kludge I built for 1.6: ie. clearing the 'module property, and replacing scm_stand_in_procs with a weak key hash table.

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?

 Han-Wen Nienhuys - address@hidden -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]