"David Huebel" <davidhuebel@...> writes:
> I tried to save a core image using (sb-ext:save-lisp-and-die
> "foo.core") when SBCL's memory usage was at about 1.7 GB (including
> about 1.6 GB of live data I want to save) on a machine with 2 GB of
> physical memory. The machine quickly started swapping, and I left it
> to run overnight. The process had been killed when I woke up.
>
> How much space do I need to run save-lisp-and-die?
The maximum memory usage will be about double of the
pre-SAVE-LISP-AND-DIE amount.
> I am about to
> expand the box to 4 GB; will that be sufficient, or do I need to
> reduce my memory usage before saving an image?
That should be enough. Until then, you shold be able to save a core if
you comment out the following lines in gencgc.c (starting around line
4756) and recompile SBCL:
prepare_for_final_gc();
gencgc_alloc_start_page = last_free_page;
collect_garbage(HIGHEST_NORMAL_GENERATION+1);
prepare_for_final_gc();
gencgc_alloc_start_page = -1;
collect_garbage(HIGHEST_NORMAL_GENERATION+1);
(Untested, but I think it should work).
--
Juho Snellman
|