1.0.47.9: Oh very funny
[sbcl.git] / src / code / gc.lisp
index c76ca43..042ab05 100644 (file)
@@ -224,8 +224,13 @@ run in any thread.")
                    (let ((start-time (get-internal-run-time)))
                      (collect-garbage gen)
                      (setf *gc-epoch* (cons nil nil))
-                     (incf *gc-run-time*
-                           (- (get-internal-run-time) start-time)))
+                     (let ((run-time (- (get-internal-run-time) start-time)))
+                       ;; KLUDGE: Sometimes we see the second getrusage() call
+                       ;; return a smaller value than the first, which can
+                       ;; lead to *GC-RUN-TIME* to going negative, which in
+                       ;; turn is a type-error.
+                       (when (plusp run-time)
+                         (incf *gc-run-time* run-time))))
                    (setf *gc-pending* nil
                          new-usage (dynamic-usage))
                    #!+sb-thread
@@ -346,7 +351,9 @@ collection is initiated. This can be set with SETF."
             (number-of-gcs int)
             (number-of-gcs-before-promotion int)
             (cum-sum-bytes-allocated unsigned-long)
-            (minimum-age-before-gc double)))
+            (minimum-age-before-gc double)
+            ;; `struct lutex *' or `void *', depending.
+            (lutexes (* char))))
 
 #!+gencgc
 (define-alien-variable generations
@@ -358,7 +365,7 @@ collection is initiated. This can be set with SETF."
                 (defun ,(symbolicate "GENERATION-" slot) (generation)
                   #!+sb-doc
                   ,doc
-                 #!+gencgc
+                  #!+gencgc
                   (declare (generation-index generation))
                   #!-gencgc
                   (declare (ignore generation))
@@ -369,7 +376,7 @@ collection is initiated. This can be set with SETF."
                   (slot (deref generations generation) ',slot))
                 ,@(when setfp
                         `((defun (setf ,(symbolicate "GENERATION-" slot)) (value generation)
-                           #!+gencgc
+                            #!+gencgc
                             (declare (generation-index generation))
                             #!-gencgc
                             (declare (ignore value generation))