Changeset 2335
- Timestamp:
- 01/17/08 17:30:34 (1 year ago)
- Files:
-
- branches/bos/projects/bos/m2/allocation-cache.lisp (modified) (4 diffs)
- branches/bos/projects/bos/m2/allocation.lisp (modified) (1 diff)
- branches/bos/projects/bos/m2/packages.lisp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/bos/projects/bos/m2/allocation-cache.lisp
r2329 r2335 136 136 (<= 1 n +threshold+)) 137 137 138 (defun allocation-cache-find-exact-match (n &key remove)138 (defun find-exact-match (n &key remove) 139 139 "Will return a free contigous region of size N 140 140 as a list of m2 instances. If no such region exactly … … 148 148 (t (index-lookup n)))) 149 149 150 (defun a llocation-cache-add-area (allocation-area)150 (defun add-area (allocation-area) 151 151 (dolist (region (free-regions allocation-area) 152 152 allocation-area) … … 156 156 (incf (ignored-size *allocation-cache*) size))))) 157 157 158 (defun allocation-cache-free-regions-count ()158 (defun free-regions-count () 159 159 (iter 160 160 (for regions in-vector (allocation-cache-index *allocation-cache*)) 161 161 (summing (length regions)))) 162 162 163 (defun allocation-cache-free-regions-pprint ()163 (defun free-regions-pprint () 164 164 (iter 165 165 (for regions in-vector (allocation-cache-index *allocation-cache*)) … … 174 174 (dolist (allocation-area (class-instances 'allocation-area)) 175 175 (when (allocation-area-active-p allocation-area) 176 (a llocation-cache-add-area allocation-area))))176 (add-area allocation-area)))) 177 177 178 178 (defun suggest-free-region-size () branches/bos/projects/bos/m2/allocation.lisp
r2329 r2335 626 626 (unless (in-transaction-p) 627 627 (error "find-free-m2s called outside of the allocation transaction")) 628 (or (bos.m2.allocation-cache: allocation-cache-find-exact-match n :remove t)628 (or (bos.m2.allocation-cache:find-exact-match n :remove t) 629 629 (some (lambda (area) (allocation-area-find-free-m2s area n)) 630 630 (active-allocation-areas)) branches/bos/projects/bos/m2/packages.lisp
r2331 r2335 212 212 (:export #:cert-daemon)) 213 213 214 ;;; maybe there is a nicer way to do this 215 ;;; if you want to test this run ./build.sh at least twice ! 216 (intern "POINT-IN-POLYGON-P" :bos.m2) 214 217 215 218 (defpackage :bos.m2.allocation-cache
