projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
move checking for constant ALIEN-INFO into a separate function
[sbcl.git]
/
src
/
code
/
gc.lisp
diff --git
a/src/code/gc.lisp
b/src/code/gc.lisp
index
50226ab
..
5ea3669
100644
(file)
--- a/
src/code/gc.lisp
+++ b/
src/code/gc.lisp
@@
-243,7
+243,7
@@
NIL as the pathname."
(let ((*gc-inhibit* t))
(let ((old-usage (dynamic-usage))
(new-usage 0))
(let ((*gc-inhibit* t))
(let ((old-usage (dynamic-usage))
(new-usage 0))
- (unsafe-clear-roots)
+ (unsafe-clear-roots gen)
(gc-stop-the-world)
(let ((start-time (get-internal-run-time)))
(collect-garbage gen)
(gc-stop-the-world)
(let ((start-time (get-internal-run-time)))
(collect-garbage gen)
@@
-316,7
+316,8
@@
NIL as the pathname."
(define-alien-routine scrub-control-stack sb!alien:void)
(define-alien-routine scrub-control-stack sb!alien:void)
-(defun unsafe-clear-roots ()
+(defun unsafe-clear-roots (gen)
+ #!-gencgc (declare (ignore gen))
;; KLUDGE: Do things in an attempt to get rid of extra roots. Unsafe
;; as having these cons more then we have space left leads to huge
;; badness.
;; KLUDGE: Do things in an attempt to get rid of extra roots. Unsafe
;; as having these cons more then we have space left leads to huge
;; badness.
@@
-324,10
+325,15
@@
NIL as the pathname."
;; Power cache of the bignum printer: drops overly large bignums and
;; removes duplicate entries.
(scrub-power-cache)
;; Power cache of the bignum printer: drops overly large bignums and
;; removes duplicate entries.
(scrub-power-cache)
- ;; FIXME: CTYPE-OF-CACHE-CLEAR isn't thread-safe.
- #!-sb-thread
- (ctype-of-cache-clear))
-
+ ;; Clear caches depending on the generation being collected.
+ #!+gencgc
+ (cond ((eql 0 gen))
+ ((eql 1 gen)
+ (ctype-of-cache-clear))
+ (t
+ (drop-all-hash-caches)))
+ #!-gencgc
+ (drop-all-hash-caches))
\f
;;;; auxiliary functions
\f
;;;; auxiliary functions