X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fsave.lisp;h=1ddf475c3aa6641ef54e4e8ebb044a6affd5cbe4;hb=7717fef2d28f273185838304a20bafe660a1fde2;hp=059f132331a978b10f8548e88d5f0bea17f2ed26;hpb=406c4143b9aa508c35c0004f57f587170dfda166;p=sbcl.git diff --git a/src/code/save.lisp b/src/code/save.lisp index 059f132..1ddf475 100644 --- a/src/code/save.lisp +++ b/src/code/save.lisp @@ -95,7 +95,7 @@ The save/load process changes the values of some global variables: This is reinitialized to reflect the working directory where the saved core is loaded. -SAVE-LISP-AND-DIE interacts with SB-ALIEN:LOAD-FOREIGN-OBJECT: see its +SAVE-LISP-AND-DIE interacts with SB-ALIEN:LOAD-SHARED-OBJECT: see its documentation for details. On threaded platforms only a single thread may remain running after @@ -132,20 +132,23 @@ sufficiently motivated to do lengthy fixes." (foreign-bool (value) (if value 1 0)) (save-core (gc) - (when gc - #!-gencgc (gc) - ;; Do a destructive non-conservative GC, and then save a core. - ;; A normal GC will leave huge amounts of storage unreclaimed - ;; (over 50% on x86). This needs to be done by a single function - ;; since the GC will invalidate the stack. - #!+gencgc (gc-and-save (unix-namestring core-file-name nil) - (foreign-bool executable) - (foreign-bool save-runtime-options))) - (without-gcing - (save (unix-namestring core-file-name nil) - (get-lisp-obj-address #'restart-lisp) - (foreign-bool executable) - (foreign-bool save-runtime-options))))) + (let ((name (native-namestring + (physicalize-pathname core-file-name) + :as-file t))) + (when gc + #!-gencgc (gc) + ;; Do a destructive non-conservative GC, and then save a core. + ;; A normal GC will leave huge amounts of storage unreclaimed + ;; (over 50% on x86). This needs to be done by a single function + ;; since the GC will invalidate the stack. + #!+gencgc (gc-and-save name + (foreign-bool executable) + (foreign-bool save-runtime-options))) + (without-gcing + (save name + (get-lisp-obj-address #'restart-lisp) + (foreign-bool executable) + (foreign-bool save-runtime-options)))))) ;; Save the restart function into a static symbol, to allow GC-AND-SAVE ;; access to it even after the GC has moved it. #!+gencgc