[slime-devel] Re: memory leak caused by clickable value history in the SLIME REPL

Matthias Koeppe mkoeppe+slime at mail.math.uni-magdeburg.de
Sat Dec 23 13:00:51 UTC 2006


Matthias Koeppe <mkoeppe+slime at mail.math.uni-magdeburg.de> writes:

> Marco Baringer <mb at bese.it> writes:
>
>> "Hoehle, Joerg-Cyril" <Joerg-Cyril.Hoehle at t-systems.com> writes:
>>
>>> In my particular case, huge data structures would have been ready
>>> to free if SLIME had not kept that link.  How can I clear this
>>> value cache, or control the cache policy?
>>
>> you can disable it completly by setting swank::*record-repl-results*
>> to nil. you can clear the current set of values by clearing the repl
>> buffer (M-x slime-repl-clear-buffer or C-c C-t).
>
> I would like to add that the history is meant to be implemented by a
> _weak_ hash table, using the SLIME backend functions
> MAKE-WEAK-KEY-HASH-TABLE and MAKE-WEAK-VALUE-HASH-TABLE.  If those are
> implemented properly for a CL implementation that supports weak
> hashtables, the REPL history items (and other presentations) do not
> cause any memory leak.
>
> The functions are implemented both for Allegro CL and SBCL, but not
> for CLISP (which Jörg might be using), which I think has excellent
> support for weak hash tables.

An update:  I have now provided these functions for CLISP.

-- 
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe




More information about the slime-devel mailing list