X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fgc.lisp;h=973799df2f8c9045ca5920567bd858db3dbf6ef7;hb=b8f63d9b4e978bec3bfc1f4fc471e5ed946781fd;hp=3f8f2aafeefa2b962b94f8e7642eb0b5f89c870c;hpb=6cbbf4fbfb46f323fefc50ff28daa42a30d5698e;p=sbcl.git diff --git a/src/code/gc.lisp b/src/code/gc.lisp index 3f8f2aa..973799d 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -10,9 +10,6 @@ ;;;; files for more information. (in-package "SB!KERNEL") - -(file-comment - "$Header$") ;;;; DYNAMIC-USAGE and friends @@ -26,11 +23,6 @@ (defun ,lisp-fun () (sb!alien:extern-alien ,c-var-name (sb!alien:unsigned 32)))))) -(def-c-var-frob sb!vm:control-stack-start "control_stack") -#!+x86 (def-c-var-frob control-stack-end "control_stack_end") -(def-c-var-frob sb!vm:binding-stack-start "binding_stack") -(def-c-var-frob sb!vm:current-dynamic-space-start "current_dynamic_space") - #!-sb-fluid (declaim (inline dynamic-usage)) (def-c-var-frob dynamic-usage "bytes_allocated") @@ -44,13 +36,13 @@ (defun control-stack-usage () #!-x86 (- (sb!sys:sap-int (sb!c::control-stack-pointer-sap)) - (control-stack-start)) - #!+x86 (- (control-stack-end) + sb!vm:control-stack-start) + #!+x86 (- sb!vm:control-stack-end (sb!sys:sap-int (sb!c::control-stack-pointer-sap)))) (defun binding-stack-usage () (- (sb!sys:sap-int (sb!c::binding-stack-pointer-sap)) - (sb!vm:binding-stack-start))) + sb!vm:binding-stack-start)) ;;;; ROOM @@ -360,11 +352,11 @@ (set-auto-gc-trigger *gc-trigger*) (dolist (hook *after-gc-hooks*) (/show0 "doing a hook from *AFTER-GC--HOOKS*") - ;; FIXME: This hook should be called with the - ;; same kind of information as *GC-NOTIFY-AFTER*. - ;; In particular, it would be nice for the - ;; hook function to be able to adjust *GC-TRIGGER* - ;; intelligently to e.g. 108% of total memory usage. + ;; FIXME: This hook should be called with the same + ;; kind of information as *GC-NOTIFY-AFTER*. In + ;; particular, it would be nice for the hook function + ;; to be able to adjust *GC-TRIGGER* intelligently to + ;; e.g. 108% of total memory usage. (carefully-funcall hook)) (when *gc-notify-stream* (/show0 "doing the *GC-NOTIFY-AFTER* thing") @@ -382,7 +374,7 @@ (incf *gc-run-time* (- (get-internal-run-time) start-time)))) ;; FIXME: should probably return (VALUES), here and in RETURN-FROM - (/show "returning from tail of SUB-GC") + (/show0 "returning from tail of SUB-GC") nil) ;;; This routine is called by the allocation miscops to decide whether