Make gc-abort-test act differently during the boot load, rather than
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 7 Feb 1992 19:47:41 +0000 (19:47 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Fri, 7 Feb 1992 19:47:41 +0000 (19:47 +0000)
fail because of an unassigned variable.

v7/src/runtime/gc.scm
v7/src/runtime/make.scm
v7/src/runtime/version.scm
v8/src/runtime/make.scm

index 4a456a4e61e9f9dcb4ef138bf270481c2abeeb8c..e5c10f33b26896638525a8a942e3efe83af72d57 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/gc.scm,v 14.7 1991/11/26 07:06:03 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/gc.scm,v 14.8 1992/02/07 19:47:24 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -38,6 +38,7 @@ MIT in each case. |#
 (declare (usual-integrations))
 \f
 (define (initialize-package!)
+  (set! gc-boot-loading? true)
   (set! hook/gc-flip default/gc-flip)
   (set! hook/purify default/purify)
   (set! hook/stack-overflow default/stack-overflow)
@@ -152,16 +153,29 @@ MIT in each case. |#
   start-value space-remaining
   false)
 
+(define gc-boot-loading?)
+
+(define gc-boot-death-message
+  "\n;; Aborting boot-load: Not enough memory to load -- Use -large option.\n")
+  
 (define (gc-abort-test space-remaining)
   (if (< space-remaining 4096)
-      (abort->nearest
-       (cmdl-message/append
-       (cmdl-message/strings "Aborting!: out of memory")
-       ;; Clean up whatever possible to avoid a reoccurrence.
-       (cmdl-message/active
-        (lambda (port)
-          port
-          (with-gc-notification! true gc-clean)))))))
+      (if gc-boot-loading?
+         (let ((console ((ucode-primitive tty-output-channel 0))))
+           ((ucode-primitive channel-write 4)
+            console
+            gc-boot-death-message
+            0
+            ((ucode-primitive string-length 1) gc-boot-death-message))
+           ((ucode-primitive exit-with-value 1) #x14))
+         (abort->nearest
+          (cmdl-message/append
+           (cmdl-message/strings "Aborting!: out of memory")
+           ;; Clean up whatever possible to avoid a reoccurrence.
+           (cmdl-message/active
+            (lambda (port)
+              port
+              (with-gc-notification! true gc-clean))))))))
 \f
 ;;;; User Primitives
 
index f2b40f2defa65fe35b30b447f2f88b4aecbaa2e7..5880358312dfb2eb1dd9d3cd4161f7e20f257d6d 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/make.scm,v 14.31 1991/11/15 05:14:57 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/make.scm,v 14.32 1992/02/07 19:47:32 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -383,6 +383,8 @@ MIT in each case. |#
                   (fasload/update-debugging-info! object (car entry))
                   (load/purification-root object)))
               fasload-purification-queue)))))
+  (set! (access gc-boot-loading? (->environment '(RUNTIME GARBAGE-COLLECTOR)))
+       false)
   (set! fasload-purification-queue)
   (newline console-output-port)
   (write-string "purifying..." console-output-port)
index 965067665e6c1312f174298ff66c8e239a561cb3..1aa53563747e83388c3ebb934ba191f60c708c83 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.144 1992/01/30 17:08:31 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/version.scm,v 14.145 1992/02/07 19:47:41 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -45,7 +45,7 @@ MIT in each case. |#
                     '()))
   (add-system! microcode-system)
   (add-event-receiver! event:after-restore snarf-microcode-version!)
-  (add-identification! "Runtime" 14 144))
+  (add-identification! "Runtime" 14 145))
 
 (define microcode-system)
 
index 6103ab75210a90ec49db54a43f6d34287c148efc..c7f301bddc938742defe9a6ccbb89ec1344c9b7e 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/make.scm,v 14.31 1991/11/15 05:14:57 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/runtime/make.scm,v 14.32 1992/02/07 19:47:32 jinx Exp $
 
-Copyright (c) 1988-91 Massachusetts Institute of Technology
+Copyright (c) 1988-1992 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -383,6 +383,8 @@ MIT in each case. |#
                   (fasload/update-debugging-info! object (car entry))
                   (load/purification-root object)))
               fasload-purification-queue)))))
+  (set! (access gc-boot-loading? (->environment '(RUNTIME GARBAGE-COLLECTOR)))
+       false)
   (set! fasload-purification-queue)
   (newline console-output-port)
   (write-string "purifying..." console-output-port)