X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fsave.c;h=d0e5026e4447813c03ad75524cd5ec2cc740240a;hb=03363f0145ab5e88a17a4b881068dc921f7d122f;hp=9273ce19aeb7286e060480e0563ccec5a1244042;hpb=baa0eaf21221dc564088c37b228c620c298aeaa1;p=sbcl.git diff --git a/src/runtime/save.c b/src/runtime/save.c index 9273ce1..d0e5026 100644 --- a/src/runtime/save.c +++ b/src/runtime/save.c @@ -79,7 +79,7 @@ write_bytes(FILE *file, char *addr, long bytes, os_vm_offset_t file_offset) 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 @@ output_space(FILE *file, int id, lispobj *addr, lispobj *end, os_vm_offset_t fil 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); @@ -166,18 +166,26 @@ save_to_filehandle(FILE *file, char *filename, lispobj init_function, (lispobj *)STATIC_SPACE_START, (lispobj *)SymbolValue(STATIC_SPACE_FREE_POINTER,0), core_start_pos); +#ifdef LISP_FEATURE_GENCGC + /* Flush the current_region, updating the tables. */ + gc_alloc_update_all_page_tables(); + update_dynamic_space_free_pointer(); +#endif #ifdef reg_ALLOC +#ifdef LISP_FEATURE_GENCGC output_space(file, DYNAMIC_CORE_SPACE_ID, - (lispobj *)current_dynamic_space, + (lispobj *)DYNAMIC_SPACE_START, dynamic_space_free_pointer, core_start_pos); #else -#ifdef LISP_FEATURE_GENCGC - /* Flush the current_region, updating the tables. */ - gc_alloc_update_all_page_tables(); - update_dynamic_space_free_pointer(); + output_space(file, + DYNAMIC_CORE_SPACE_ID, + (lispobj *)current_dynamic_space, + dynamic_space_free_pointer, + core_start_pos); #endif +#else output_space(file, DYNAMIC_CORE_SPACE_ID, (lispobj *)DYNAMIC_SPACE_START,