3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; While most of SBCL is derived from the CMU CL system, the test
7 ;;;; files (like this one) were written from scratch after the fork
10 ;;;; This software is in the public domain and is provided with
11 ;;;; absoluely no warranty. See the COPYING and CREDITS files for
12 ;;;; more information.
20 (setq *x* (make-string 100000))))
22 ;; check that WITHOUT-INTERRUPTS doesn't block the gc trigger
23 (sb-sys:without-interrupts (cons-madly))
25 ;; check that WITHOUT-INTERRUPTS doesn't block SIG_STOP_FOR_GC
27 (sb-sys:without-interrupts
28 (let ((thread (sb-thread:make-thread (lambda () (sb-ext:gc)))))
29 (loop while (sb-thread:thread-alive-p thread))))
31 (let ((gc-happend nil))
32 (push (lambda () (setq gc-happend t)) sb-ext:*after-gc-hooks*)
34 ;; check that WITHOUT-GCING defers explicit gc
37 (assert (not gc-happend)))
40 ;; check that WITHOUT-GCING defers SIG_STOP_FOR_GC
42 (let ((in-without-gcing nil))
44 (sb-thread:make-thread (lambda ()
45 (loop while (not in-without-gcing))
48 (setq in-without-gcing t)
50 (assert (not gc-happend)))
51 ;; give the hook time to run
55 ;;; SB-EXT:GENERATION-* accessors returned bogus values for generation > 0
56 (with-test (:name :bug-529014 :skipped-on '(not :gencgc))
57 ;; FIXME: These parameters are a) tunable in the source and b)
58 ;; duplicated multiple times there and now here. It would be good to
59 ;; OAOO-ify them (probably to src/compiler/generic/params.lisp).
60 (loop for i from 0 to sb-vm:+pseudo-static-generation+
61 do (assert (= (sb-ext:generation-bytes-consed-between-gcs i) 2000000))
62 (assert (= (sb-ext:generation-minimum-age-before-gc i) 0.75))
63 (assert (= (sb-ext:generation-number-of-gcs-before-promotion i) 1))))