On 5 April 2012 18:28, Eugene Tyurin <eugene@...> wrote:
> Is it possible to increase heap while using --script option?
Yes and no.
Strictly speaking, you can combine --dynamic-space-size with --script,
but on most operating systems shebang lines can only use a single
argument, so you can't do so in an actual #! script...
Some workarounds:
* Build SBCL with a bigger default dynamic space. (See INSTALL for details.)
* Save an SBCL executable with a bigger dynamic space:
sbcl --dynamic-space-size 4Gb --no-userinit --no-sysinit
(save-lisp-and-die "sbcl-big" :executable t :save-runtime-options t)
* Use trampoline script:
sbcl4gb:
#!/bin/sh
exec sbcl --dynamic-space-size 4Gb $@
Your script:
$!/bin/sbcl4gb --script
...
> Recently my SBCL scripts started getting "Heap exhausted, game over" errors.
This is probably due to shrinking of the default dynamic space in last
November: the old default spaces were so big that it was relatively
easy to have a rogue SBCL process exceeding the physical memory and
have the whole system slow down due thrashing, or have the OOM killer
hit.
Cheers,
-- Nikodemus
|