Q:

How to Configure SBCL to Use More RAM When Started Through Emacs?

How can I configure SBCL so that it uses more memory than the default when I start it by using "M-x slime" in Emacs?
From what I've seen online, the answer appears to be to call SBCL, passing the argument "--dynamic-space-size <size in MB>".  Since I do not call SBCL directly, I do not know how to pass it arguments.
I am using GNU Emacs 22.3.1 and SBCL 1.0.48 on Windows 7.  I have no experience configuring either, so a novice's introduction would be appreciated.

A:

The usual way is to set the value of the variable inferior-lisp-program to the command you want executed, including any options you want to give. Don't have an emacs on me right now, but this might be enough: 
(setq inferior-lisp-program "sbcl --dynamic-space-size 1024")

A:

I'm using SLIME 1:20120420-2 on Debian squeeze. The answer by Kilian Foth does not work as of this version. I wrote to slime-devel and was told

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"))))

So, if one wants to check what the value of slime-lisp-implementations is

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.

As it turns out, the value of slime-lisp-implementations for me was
(("sbcl" ("sbcl")) ("clisp" ("clisp")) ("ecl" ("ecl")) ("cmucl" ("cmucl")))   

So, I put the following in my ~/.emacs
(setq slime-lisp-implementations '(("sbcl" ("sbcl" "--dynamic-space-size" "1024")) ("clisp" ("clisp")) ("ecl" ("ecl")) ("cmucl" ("cmucl"))))

With regards to where this was set

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/

In this version of SLIME, slime-lisp-implementations is set in /usr/share/emacs/site-lisp/slime/slime.el.
For documentation of slime-lisp-implementations, see the
Slime Manual: 2.5.2 Multiple Lisps
or use M-x describe-variable.
All quotes above are from  the thread setting heap size for SBCL for use with SLIME
 on slime-devel.

