Remove some test noise. A drop in the ocean unfortunately.
[sbcl.git] / src / code / purify.lisp
blob5d13e634a1d8cb184e0571a4abe7ae9c522a7a85
1 ;;;; This software is part of the SBCL system. See the README file for
2 ;;;; more information.
3 ;;;;
4 ;;;; This software is derived from the CMU CL system, which was
5 ;;;; written at Carnegie Mellon University and released into the
6 ;;;; public domain. The software is in the public domain and is
7 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
8 ;;;; files for more information.
10 (in-package "SB!KERNEL")
12 (define-alien-routine ("purify" %purify) void
13 (static-roots unsigned-long)
14 (read-only-roots unsigned-long))
16 (defun purify (&key root-structures environment-name)
17 #!+sb-doc
18 "This function optimizes garbage collection by moving all currently live
19 objects into non-collected storage. ROOT-STRUCTURES is an optional list of
20 objects which should be copied first to maximize locality.
22 DEFSTRUCT structures defined with the (:PURE T) option are moved into
23 read-only storage, further reducing GC cost. List and vector slots of pure
24 structures are also moved into read-only storage.
26 ENVIRONMENT-NAME is unused.
28 This function is a no-op on platforms using the generational garbage
29 collector (x86, x86-64, ppc)."
30 (declare (ignore environment-name))
31 #!+gencgc
32 (declare (ignore root-structures))
33 #!-gencgc
34 (%purify (get-lisp-obj-address root-structures)
35 (get-lisp-obj-address nil)))