Hi, I've found a memory leak in GUILE. The contents of modules are not garbage collected. This seems to be related with two errors: - scm_stand_in_procs is a hashtable. I believe it should be weak_key hashtable, just like the scm_object_whash table. For, if a closure is GC'd, so should it properties. - in boot-9.scm, set-module-eval-closure! does (set-procedure-property! closure 'module module)) So the closure is a key in a weak hash-table, pointing to the module as a value (using scm_stand_in_procs), the module is always marked during GC. However, since the module points back to the closure via the 'eval-closure slot, the key is always marked. Consequently, neither closure nor module are ever GC'd. I've fixed this by introducing a new function (eval-closure-module) which returns the module of a closure via the eval-closure smob. Find the patch (including test) attached. I don't really know what I am doing, so please comment. FWIW, the test suite compiled without complaints. If noone objects, I will merge this patch tomorrow night. Furthermore, I believe the same bug is in GUILE 1.6, so a 1.6.8 release is warranted IMO. Greetings, Han-Wen PS. I feel like a broken record, but when will GUILE 1.8 be out? -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen