/[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.29 by toy, Thu Nov 7 16:07:23 2002 UTC revision 1.30 by toy, Tue Nov 19 12:38:55 2002 UTC
# Line 185  Line 185 
185             (setq *last-bytes-in-use* bytes))))             (setq *last-bytes-in-use* bytes))))
186    *total-bytes-consed*)    *total-bytes-consed*)
187    
 #+(or cgc gencgc)  
 (defun get-bytes-consed ()  
   "Returns the number of bytes consed since the first time this function  
   was called.  The first time it is called, it returns zero."  
   (dfixnum:dfixnum-integer (get-bytes-consed-dfixnum)))  
   
188  #-(or cgc gencgc)  #-(or cgc gencgc)
189  (defun get-bytes-consed ()  (defun get-bytes-consed-dfixnum ()
190    "Returns the number of bytes consed since the first time this function    "Returns the number of bytes consed since the first time this function
191    was called.  The first time it is called, it returns zero."    was called.  The first time it is called, it returns zero."
192    (declare (optimize (speed 3) (safety 0)(inhibit-warnings 3)))    (declare (optimize (speed 3) (safety 0)(inhibit-warnings 3)))
193    (cond ((null *last-bytes-in-use*)    (cond ((null *last-bytes-in-use*)
194           (setq *last-bytes-in-use* (dynamic-usage))           (setq *last-bytes-in-use* (dynamic-usage))
195           (setq *total-bytes-consed* 0))           (setq *total-bytes-consed* (dfixnum:make-dfixnum)))
196          (t          (t
197           (let ((bytes (dynamic-usage)))           (let ((bytes (dynamic-usage)))
198             (incf *total-bytes-consed*             (dfixnum:dfixnum-inc-hf *total-bytes-consed*
199                   (the index (- bytes *last-bytes-in-use*)))                              (the index (- bytes *last-bytes-in-use*)))
200             (setq *last-bytes-in-use* bytes))))             (setq *last-bytes-in-use* bytes))))
201    *total-bytes-consed*)    *total-bytes-consed*)
202    
203  #-(or cgc gencgc)  (defun get-bytes-consed ()
204  (defun get-bytes-consed-dfixnum ()    "Returns the number of bytes consed since the first time this function
205    ;; A plug until a direct implementation is available.    was called.  The first time it is called, it returns zero."
206    (dfixnum:dfixnum-make-from-number (get-bytes-consed)))    (dfixnum:dfixnum-integer (get-bytes-consed-dfixnum)))
207    
208    
209  ;;;; Variables and Constants.  ;;;; Variables and Constants.

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

  ViewVC Help
Powered by ViewVC 1.1.5