[slime-devel] Re: SBCL memory overcommitment after startup when using SLIME

Christophe Rhodes csr21 at cam.ac.uk
Sat Sep 17 14:11:41 UTC 2005


Aleksandar Bakic <a_bakic at yahoo.com> writes:

> Hi,
>
> I first thought this was a SBCL issue, but it appears to be SLIME's. Below is
> the scenario:
>
> 1. Run Emacs
> 2. Run SBCL from Emacs
> 3. slime-connect to SBCL
> 4. Open a file in lisp mode
> 5. In a terminal, run "top -d 1" and make sure you see SBCL and how much
> virtual memory it is using
> 6. Write in the file "(defun foo ())" and compile foo by pressing C-c C-c
> 7. You should notice that top shows a few MBs more virtual memory used by SBCL
>
> The virtual memory use does not increase if you type (compile 'foo) in REPL.
> SBCL man page describes memory overcommitment at startup, but not afterwards.
> Can you reproduce the above increase? Let me know if you need more information.

At a guess, your communication style is :spawn, you're running an sbcl
with threads, and you don't have anything performing GCs terribly
often.  At the moment, memory allocated to dead threads is only
reclaimed at gc (rather than at the death of the thread) so if each
slime command spawns a thread, you get an increase in memory usage.

Gabor Melis has been writing about this and related things on the
sbcl-devel mailing list; it might be worth reading some of those
messages.

Cheers,

Christophe




More information about the slime-devel mailing list