X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fgc.lisp;h=042ab05e61b5c9d48d148f7c73998af5437980fb;hb=eaec8176060e89efa39f01017df1f6204e491ecc;hp=8839b3e3005e4b81188ef654416af3f9f3f30222;hpb=d3a20211cd639081185d5d3de1aa2e3e080042de;p=sbcl.git diff --git a/src/code/gc.lisp b/src/code/gc.lisp index 8839b3e..042ab05 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -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