From 3daedc281d328a07ae34ed969ba231a0619aa483 Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Mon, 14 Feb 1994 12:27:03 +0000 Subject: [PATCH] Export EXT:PURIFY and remove the :CONSTANTS argument. --- code/purify.lisp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/code/purify.lisp b/code/purify.lisp index 1ced80ba2..0263e4bcc 100644 --- a/code/purify.lisp +++ b/code/purify.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/purify.lisp,v 1.13 1992/03/26 03:18:51 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/purify.lisp,v 1.14 1994/02/14 12:27:03 ram Exp $") ;;; ;;; ********************************************************************** ;;; @@ -16,13 +16,21 @@ ;;; ;;; Rewritten in C by William Lott. ;;; -(in-package 'lisp) +(in-package "LISP") +(export 'ext::purify "EXT") (alien:def-alien-routine ("purify" %purify) c-call:void (static-roots c-call:unsigned-long) (read-only-roots c-call:unsigned-long)) -(defun purify (&key root-structures constants) +(defun purify (&key root-structures) + "This function optimizes garbage collection by moving all currently live + objects into non-collected storage. ROOT-STRUCTURES is an optional list of + objects which should be copied first to maximize locality. + + DEFSTRUCT structures defined with the (:PURE T) option are moved into + read-only storage, further reducing GC cost. List and vector slots of pure + structures are also moved into read-only storage." (let ((*gc-notify-before* #'(lambda (bytes-in-use) (declare (ignore bytes-in-use)) @@ -31,11 +39,10 @@ (*internal-gc* #'(lambda () (%purify (get-lisp-obj-address root-structures) - (get-lisp-obj-address constants)))) + (get-lisp-obj-address nil)))) (*gc-notify-after* #'(lambda (&rest ignore) (declare (ignore ignore)) (write-line "Done.]")))) (gc t)) nil) - -- GitLab