Hi,
I'm wondering if anyone knows how to configure SLIME to increase SBCL's heap size. I found the question http://stackoverflow.com/questions/7181183/how-to-configure-sbcl-to-use-more... but the listed answer doesn't work for me, namely, putting
(setq inferior-lisp-program "sbcl --dynamic-space-size 1024")
in ~/.emacs. The default value is 512Mb.
I'm using the following function to determine the heap size. This code was posted by Nikodemus Siivola on SBCL help, see http://comments.gmane.org/gmane.lisp.steel-bank.general/1914
(define-alien-variable ("dynamic_space_size" dynamic-space-size-bytes) unsigned-long) (defun heap-n-bytes () (+ dynamic-space-size-bytes (- sb-vm::read-only-space-end sb-vm::read-only-space-start) (- sb-vm::static-space-end sb-vm::static-space-start)))
Please CC me on any reply. Thanks. Regards, Faheem
On 06/02/12 21:32, Faheem Mitha wrote:
Hi,
I'm wondering if anyone knows how to configure SLIME to increase SBCL's heap size. I found the question http://stackoverflow.com/questions/7181183/how-to-configure-sbcl-to-use-more... but the listed answer doesn't work for me, namely, putting
(setq inferior-lisp-program "sbcl --dynamic-space-size 1024")
in ~/.emacs. The default value is 512Mb.
As long as you're not using slime-lisp-implementations in your ~/.emacs, setting inferior-lisp-program should work.
If you're using slime-lisp-implementations, you have to modify this variable because slime ignores inferior-lisp-program if slime-lisp-implementations is not nil:
(setq slime-lisp-implementations '((sbcl ("sbcl" "--dynamic-space-size" "1024"))))
-- Dirk
On Sun, 3 Jun 2012, Dirk Sondermann wrote:
On 06/02/12 21:32, Faheem Mitha wrote:
Hi,
I'm wondering if anyone knows how to configure SLIME to increase SBCL's heap size. I found the question http://stackoverflow.com/questions/7181183/how-to-configure-sbcl-to-use-more... but the listed answer doesn't work for me, namely, putting
(setq inferior-lisp-program "sbcl --dynamic-space-size 1024")
in ~/.emacs. The default value is 512Mb.
As long as you're not using slime-lisp-implementations in your ~/.emacs, setting inferior-lisp-program should work.
If you're using slime-lisp-implementations, you have to modify this variable because slime ignores inferior-lisp-program if slime-lisp-implementations is not nil:
(setq slime-lisp-implementations '((sbcl ("sbcl" "--dynamic-space-size" "1024"))))
Hi Dirk,
Thanks for the reply.
I'm not aware of setting slime-lisp-implementations anywhere. I do have some third-party slime code in my .emacs, but it doesn't mention slime-lisp-implementations. How can I check whether I am using slime-lisp-implementations?
Regards, Faheem
* Faheem Mitha [2012-06-03 11:13] writes:
I'm not aware of setting slime-lisp-implementations anywhere. I do have some third-party slime code in my .emacs, but it doesn't mention slime-lisp-implementations. How can I check whether I am using slime-lisp-implementations?
Just evaluate the variable slime-lisp-implementations, e.g. with M-x eval-expression. If it's nil or not bound then it will not be used.
Helmut
On Sun, 3 Jun 2012, Helmut Eller wrote:
The following message is a courtesy copy of an article that has been posted to gmane.lisp.slime.devel as well.
- Faheem Mitha [2012-06-03 11:13] writes:
I'm not aware of setting slime-lisp-implementations anywhere. I do have some third-party slime code in my .emacs, but it doesn't mention slime-lisp-implementations. How can I check whether I am using slime-lisp-implementations?
Just evaluate the variable slime-lisp-implementations, e.g. with M-x eval-expression. If it's nil or not bound then it will not be used.
Hmm. it returns
(("sbcl" ("sbcl")) ("clisp" ("clisp")) ("ecl" ("ecl")) ("cmucl" ("cmucl")))
What does this mean? Regards, Faheem
* Faheem Mitha [2012-06-03 11:54] writes:
Hmm. it returns
(("sbcl" ("sbcl")) ("clisp" ("clisp")) ("ecl" ("ecl")) ("cmucl" ("cmucl")))
What does this mean?
The variable is documented here http://common-lisp.net/project/slime/doc/html/Multiple-Lisps.htm. or just use M-x describe-variable.
If you just want to set the heap size put this in your .emacs: (setq slime-lisp-implementations '((sbcl ("sbcl" "--dynamic-space-size" "1024"))))
If you want to figure out who or what sets it's to the value it has, also check /etc/emacs/site-lisp/ or /usr/share/emacs/site-lisp/
Helmut
On Sun, 3 Jun 2012, Helmut Eller wrote:
The following message is a courtesy copy of an article that has been posted to gmane.lisp.slime.devel as well.
- Faheem Mitha [2012-06-03 11:54] writes:
Hmm. it returns
(("sbcl" ("sbcl")) ("clisp" ("clisp")) ("ecl" ("ecl")) ("cmucl" ("cmucl")))
What does this mean?
The variable is documented here http://common-lisp.net/project/slime/doc/html/Multiple-Lisps.htm. or just use M-x describe-variable.
If you just want to set the heap size put this in your .emacs: (setq slime-lisp-implementations '((sbcl ("sbcl" "--dynamic-space-size" "1024"))))
If you want to figure out who or what sets it's to the value it has, also check /etc/emacs/site-lisp/ or /usr/share/emacs/site-lisp/
Hi Helmut,
Thanks very much for your helpful answers. I tried this out and it worked, though I used
(setq slime-lisp-implementations '(("sbcl" ("sbcl" "--dynamic-space-size" "1024")) ("clisp" ("clisp")) ("ecl" ("ecl")) ("cmucl" ("cmucl"))))
instead. I also added an answer to http://stackoverflow.com/questions/7181183/how-to-configure-sbcl-to-use-more...
I quoted from you and Dirk Sondermann. I hope that's Ok.
Regards, Faheem
On 2 June 2012 22:32, Faheem Mitha faheem@faheem.info wrote:
I'm using the following function to determine the heap size. This code was posted by Nikodemus Siivola on SBCL help, see http://comments.gmane.org/gmane.lisp.steel-bank.general/1914
(defun heap-n-bytes ()
A tangent, but: as of late last year you can just use SB-EXT:DYNAMIC-SPACE-SIZE.
Cheers,
-- nikodemus