[cram-developers] SBCL heap size

Jan Winkler winkler at cs.uni-bremen.de
Tue Mar 18 09:21:06 CET 2014


Hey,

thanks for the nice summary, Gaya!
This really solved the problem at its root.

One more slight comment on it, since I mindlessly ran into it:
The order of parameters for the sbcl-binary actually matters.

(inferior-lisp-program (concat sbcl-binary
                                        " --dynamic-space-size 4096"
                                        " --load " roslisp-path
                                        "/scripts/roslisp-sbcl-init"))

works like a charm, while

(inferior-lisp-program (concat sbcl-binary
                                        " --load " roslisp-path
                                        "/scripts/roslisp-sbcl-init"
                                        " --dynamic-space-size 4096"))

doesn't work. Parameters after "--load <file>" are not accepted by the
sbcl-binary. It won't even complain, but you will be stuck with the
default heap size of 1024 MB.


Cheers,
Jan


On 03/14/2014 11:19 PM, Gayane Kazhoyan wrote:
> Dear CRAM developers,
> 
> Some of us have recently been getting into problems with SBCL heap overflow.
> The usual way to change the heap size is either to set
> 
> (slime-lisp-implementations
>    '((sbcl ("sbcl" "--dynamic-space-size" "MY-NEW-HEAP-SIZE"))))
> 
> before invoking slime, e.g. in the emacs init file, or to pass a command
> line argument ``--dynamic-heap-size MY-NEW-HEAP-SIZE`` to the sbcl
> executive.
> 
> As in our case slime is invoked by rosemacs and the SLIME-ROS function
> thereof overrides user-defined SLIME-LISP-IMPLEMENTATIONS, the first option
> of the above will not have any effect.
> So, what is left is to pass the command line argument. I found no better
> solution than to change the slime-ros.el itself. It is located in
> /usr/share/emacs/site-lisp/rosemacs-el.
> You should end up with
> 
> (inferior-lisp-program (concat sbcl-binary
>                                         " --dynamic-space-size 4096"
>                                         " --load " roslisp-path
>                                         "/scripts/roslisp-sbcl-init"))
> 
> for 4 GB of RAM.
> 
> To check if the change has taken effect, call (sb-ext:dynamic-space-size).
> 
> My default heap size used to be 1 GB and since the change I haven't been
> getting into any overflow problems whatsoever.
> 
> If that doesn't help, the function for explicitly calling the garbage
> collector was (sb-ext:gc :full t).
> 
> Cheers,
> Gaya
> 
> 
> 
> _______________________________________________
> cram-developers mailing list
> cram-developers at informatik.uni-bremen.de
> https://mailman.informatik.uni-bremen.de/mailman/listinfo/cram-developers
> 

-- 
Dipl. Ing. Jan Winkler
Technologie-Zentrum Informatik und Informationstechnik
Raum 1.56
Am Fallturm 1 (TAB Gebaeude)
Universitaet Bremen
28359 Bremen, Deutschland

E-Mail: winkler at cs.uni-bremen.de
Tel: +49 (0)421-218-64019
Fax: +49 (0)421-218-64047


More information about the cram-developers mailing list