|
From: Juho S. <js...@ik...> - 2006-05-05 22:32:24
|
<ben...@cm...> wrote:
> Once I had all my data structures loaded (which takes
> a while), I tried to do a save-lisp-and-die so I wouldn't have to load
> it all again. It did not signal an error and at first seemed to work,
> but the image it produced was only 557072 bytes (557K, not several gigs
> as I expected). You can see the output from save-lisp-and-die pasted
> below. The interesting thing is that the number of bytes it reports to
> have written from the dynamic space is negative. I wonder if this could
> indicate that there's a 32 bit counter in that function somewhere...
Oops. Does the following (untested) patch fix the problem?
Index: src/runtime/save.c
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/runtime/save.c,v
retrieving revision 1.25
diff -u -r1.25 save.c
--- src/runtime/save.c 21 Feb 2006 22:59:34 -0000 1.25
+++ src/runtime/save.c 5 May 2006 22:29:28 -0000
@@ -79,7 +79,7 @@
static void
output_space(FILE *file, int id, lispobj *addr, lispobj *end, os_vm_offset_t file_offset)
{
- int words, bytes, data;
+ size_t words, bytes, data;
static char *names[] = {NULL, "dynamic", "static", "read-only"};
write_lispobj(id, file);
@@ -88,7 +88,7 @@
bytes = words * sizeof(lispobj);
- printf("writing %d bytes from the %s space at 0x%08lx\n",
+ printf("writing %ld bytes from the %s space at 0x%08lx\n",
bytes, names[id], (unsigned long)addr);
data = write_bytes(file, (char *)addr, bytes, file_offset);
--
Juho Snellman
|