Aleksandar Bakic a_bakic@yahoo.com writes:
Hi,
I first thought this was a SBCL issue, but it appears to be SLIME's. Below is the scenario:
- Run Emacs
- Run SBCL from Emacs
- slime-connect to SBCL
- Open a file in lisp mode
- 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