[slime-devel] setting heap size for SBCL for use with SLIME

Faheem Mitha faheem at faheem.info
Sat Jun 2 19:32:31 UTC 2012


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-ram-when-started-through-emacs 
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




More information about the slime-devel mailing list