0.7.13.21:
[sbcl.git] / src / code / gc.lisp
index 523f347..086d683 100644 (file)
@@ -33,9 +33,9 @@
 
 #!-sb-fluid
 (declaim (inline dynamic-usage)) ; to reduce PROFILEd call overhead
-#!+(or cgc gencgc)
+#!+gencgc
 (def-c-var-frob dynamic-usage "bytes_allocated")
-#!-(or cgc gencgc)
+#!-gencgc
 (defun dynamic-usage ()
   (the (unsigned-byte 32)
        (- (sb!sys:sap-int (sb!c::dynamic-space-free-pointer))
@@ -244,7 +244,7 @@ and submit it as a patch."
   (finish-output notify-stream))
 (defparameter *gc-notify-before* #'default-gc-notify-before
   #!+sb-doc
-  "This function bound to this variable is invoked before GC'ing (unless
+  "The function bound to this variable is invoked before GC'ing (unless
   *GC-NOTIFY-STREAM* is NIL) with the value of *GC-NOTIFY-STREAM* and
   current amount of dynamic usage (in bytes). It should notify the
   user that the system is going to GC.")
@@ -273,7 +273,7 @@ function should notify the user that the system has finished GC'ing.")
 ;;;; internal GC
 
 (sb!alien:define-alien-routine collect-garbage sb!alien:int
-  #!+gencgc (last-gen sb!alien:int))
+  (#!+gencgc last-gen #!-gencgc ignore sb!alien:int))
 
 (sb!alien:define-alien-routine set-auto-gc-trigger sb!alien:void
   (dynamic-usage sb!alien:unsigned-long))
@@ -349,17 +349,7 @@ function should notify the user that the system has finished GC'ing.")
                   ;; triggered GC could've done a fair amount of
                   ;; consing.)
                   (pre-internal-gc-dynamic-usage (dynamic-usage))
-                  (ignore-me
-                   #!-gencgc (funcall *internal-gc*)
-                   ;; FIXME: This EQ test is pretty gross. Among its other
-                   ;; nastinesses, it looks as though it could break if we
-                   ;; recompile COLLECT-GARBAGE. We should probably just
-                   ;; straighten out the interface so that all *INTERNAL-GC*
-                   ;; functions accept a GEN argument (and then the
-                   ;; non-generational ones just ignore it).
-                   #!+gencgc (if (eq *internal-gc* #'collect-garbage)
-                                 (funcall *internal-gc* gen)
-                                 (funcall *internal-gc*)))
+                  (ignore-me (funcall *internal-gc* gen))
                   (post-gc-dynamic-usage (dynamic-usage))
                   (n-bytes-freed (- pre-internal-gc-dynamic-usage
                                     post-gc-dynamic-usage))