X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fcache.lisp;h=5eb5930fb0ef19e877629e873e7e41ff168c58b1;hb=ebc0f0ebf9efd39519ab86ba28c33abdb25443e0;hp=4b0fbc476ef301c411afb5611ca652f04825f6b8;hpb=96a67b487909638cc0cb91114b6babf94b4bc1a7;p=sbcl.git diff --git a/src/pcl/cache.lisp b/src/pcl/cache.lisp index 4b0fbc4..5eb5930 100644 --- a/src/pcl/cache.lisp +++ b/src/pcl/cache.lisp @@ -1160,6 +1160,8 @@ (do-one-fill wrappers value)) (maybe-check-cache ncache))))) +(defvar *pcl-misc-random-state* (make-random-state)) + ;;; This is the heart of the cache filling mechanism. It implements ;;; the decisions about where entries are placed. ;;; @@ -1196,7 +1198,8 @@ (when (>= osep limit) (return-from find-free-cache-line (values primary nil))) (when (cond ((= nsep limit) t) - ((= nsep osep) (zerop (random 2))) + ((= nsep osep) + (zerop (random 2 *pcl-misc-random-state*))) ((> nsep osep) t) (t nil)) ;; See whether we can displace what is in this line so that we @@ -1235,4 +1238,3 @@ ((8 16) 4) (otherwise 6))) -(defvar *empty-cache* (make-cache)) ; for defstruct slot initial value forms