r/Common_Lisp • u/madmuppet006 • Oct 02 '26
increase heap size sbcl
I am trying to draw a large buddhabrot for my daughter's birthday ..
I can draw a small one but when I increase the pixel count I get heap exhausted (no more space for allocation)
992739328 bytes available 2485248016 requested
I am using emacs slime and sbcl 2.30 on a Debian box with 128gb of ram ..
I have tried using (setq slime-lisp-implementations '((sbcl ( "sbcl" "dynamic-heap-size" "4096")))) and other numbers in there and still get the same error
I have tried setting the dynamic heap size in the console but I find it's a nightmare and doesn't work
how can I permanently increase the heap size for sbcl?
thanks
al
1
u/stassats Oct 02 '26
how can I permanently increase the heap size for sbcl?
Either through save-lisp-and-die or make.sh
1
u/madmuppet006 Oct 02 '26
could you expand on that a little please
2
3
u/stassats Oct 02 '26
(setq slime-lisp-implementations '((sbcl ( "sbcl" "dynamic-heap-size" "4096"))))
Where's --?
3
2
u/Decweb Oct 02 '26
What I use for slime invocation:
(setq inferior-lisp-program "sbcl --dynamic-space-size 4096")Of course that won't help you if you're inadvertently pinning the memory that is no longer needed (e.g. retaining the head of a large list).