Changeset 2810

Show
Ignore:
Timestamp:
03/27/08 17:16:15 (10 months ago)
Author:
ksprotte
Message:

added for debugging: allocation-area-consistent-p

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/projects/bos/m2/allocation.lisp

    r2666 r2810  
    717717             (- (stripe-y stripe) (stripe-top stripe))) 
    718718          (* (stripe-width stripe) (stripe-height stripe)))) 
     719 
     720 
     721(defun allocation-area-consistent-p (allocation-area) 
     722  (let ((total (calculate-total-m2-count allocation-area)) 
     723        (allocated (calculate-allocated-m2-count allocation-area)) 
     724        (consistent-p t)) 
     725    (unless (= total (allocation-area-total-m2s allocation-area)) 
     726      (warn "~s's total count is ~d but should be ~d" 
     727            allocation-area (allocation-area-total-m2s allocation-area) total) 
     728      (setf consistent-p nil)) 
     729    (unless (= (- total allocated) (allocation-area-free-m2s allocation-area)) 
     730      (warn "~s's free count is ~d but should be ~d" 
     731            allocation-area (allocation-area-free-m2s allocation-area) (- total allocated)) 
     732      (setf consistent-p nil)) 
     733    consistent-p)) 
     734