On 1/24/08, Kai-Florian Richter <richter@...> wrote:
> 1) Is there a way to see the (maximum) heap size SBCL is currently
> using / offering?
Yes and no -- not builtin, but you can use the code below.
(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)))
> 2) Can I change this heap size in a running SBCL?
Not currently.
> 3) Does the command line argument '--dynamic-space-size' set this heap
> size (or at least part of it)?
Yes (part of of it.)
> 3b) Do you really state the space size in MBytes (as in
> --dynamic-space-size 250)? I pretty much got a "heap exhausted" message
> right away. Having --dynamic-space-size 250.000.000 seems to work much
> better...
Yes, it is in megabytes. The number of bytes used is (strtol(arg,0 ,0) << 20).
> 4) Finally (and possibly stupid, but since I'm at it): do these command
> line arguments also work when setting SBCL as inferior lisp in SLIME
> (yes, I admit I haven't checked any manual w.r.t. this: mea culpa)
Yes (well, assuming Emacs passes them to SBCL when it invokes it.)
Cheers,
-- Nikodemus
|