/[cmucl]/src/code/gc.lisp
ViewVC logotype

Diff of /src/code/gc.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by ram, Mon Oct 31 04:11:27 1994 UTC revision 1.20 by ram, Sat Jan 18 14:30:34 1997 UTC
# Line 42  Line 42 
42  (c-var-frob dynamic-0-space-start "dynamic_0_space")  (c-var-frob dynamic-0-space-start "dynamic_0_space")
43  (c-var-frob dynamic-1-space-start "dynamic_1_space")  (c-var-frob dynamic-1-space-start "dynamic_1_space")
44  (c-var-frob control-stack-start "control_stack")  (c-var-frob control-stack-start "control_stack")
45    #+x86 (c-var-frob control-stack-end "control_stack_end")
46  (c-var-frob binding-stack-start "binding_stack")  (c-var-frob binding-stack-start "binding_stack")
47  (c-var-frob current-dynamic-space-start "current_dynamic_space")  (c-var-frob current-dynamic-space-start "current_dynamic_space")
   
48  (declaim (inline dynamic-usage))  (declaim (inline dynamic-usage))
49    
50    #-cgc
51  (defun dynamic-usage ()  (defun dynamic-usage ()
52    (the (unsigned-byte 32)    (the (unsigned-byte 32)
53         (- (system:sap-int (c::dynamic-space-free-pointer))         (- (system:sap-int (c::dynamic-space-free-pointer))
54            (current-dynamic-space-start))))            (current-dynamic-space-start))))
55    
56    #+cgc
57    (c-var-frob dynamic-usage "cgc_bytes_allocated")
58    
59  (defun static-space-usage ()  (defun static-space-usage ()
60    (- (* lisp::*static-space-free-pointer* vm:word-bytes)    (- (* lisp::*static-space-free-pointer* vm:word-bytes)
61       (static-space-start)))       (static-space-start)))
# Line 61  Line 65 
65       (read-only-space-start)))       (read-only-space-start)))
66    
67  (defun control-stack-usage ()  (defun control-stack-usage ()
68    (- (system:sap-int (c::control-stack-pointer-sap)) (control-stack-start)))  #-x86 (- (system:sap-int (c::control-stack-pointer-sap)) (control-stack))
69    #+x86 (- (control-stack-end) (system:sap-int (c::control-stack-pointer-sap))) )
70    
71  (defun binding-stack-usage ()  (defun binding-stack-usage ()
72    (- (system:sap-int (c::binding-stack-pointer-sap)) (binding-stack-start)))    (- (system:sap-int (c::binding-stack-pointer-sap)) (binding-stack-start)))
# Line 93  Line 98 
98    (room-minimal-info)    (room-minimal-info)
99    (vm:memory-usage :count-spaces '(:dynamic)    (vm:memory-usage :count-spaces '(:dynamic)
100                     :print-spaces t                     :print-spaces t
101                     :cutoff 0.05                     :cutoff 0.05s0
102                     :print-summary nil))                     :print-summary nil))
103    
104  (defun room-maximal-info ()  (defun room-maximal-info ()
# Line 189  Line 194 
194    
195  ;;; On the RT, we store the GC trigger in a ``static'' symbol instead of  ;;; On the RT, we store the GC trigger in a ``static'' symbol instead of
196  ;;; letting magic C code handle it.  It gets initialized by the startup  ;;; letting magic C code handle it.  It gets initialized by the startup
197  ;;; code.  ;;; code. The X86 port defines this here because it uses the `ibmrt'
198  #+ibmrt  ;;; feature in the C code for allocation and binding stack access and
199  (defvar rt::*internal-gc-trigger*)  ;;; a lot of stuff wants this INTERNAL_GC_TRIGGER available as well.
200    #+(or ibmrt x86)
201    (defvar vm::*internal-gc-trigger*)
202    
203  ;;;  ;;;
204  ;;; The following specials are used to control when garbage collection  ;;; The following specials are used to control when garbage collection
# Line 392  Line 399 
399                (when verbose-p                (when verbose-p
400                  (carefully-funcall *gc-notify-after*                  (carefully-funcall *gc-notify-after*
401                                     post-gc-dyn-usage bytes-freed                                     post-gc-dyn-usage bytes-freed
402                                     *gc-trigger*))))))                                     *gc-trigger*))))
403              (scrub-control-stack)))
404        (incf *gc-run-time* (- (get-internal-run-time) start-time))))        (incf *gc-run-time* (- (get-internal-run-time) start-time))))
405    nil)    nil)
406    

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.5