Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
3daedc28
Commit
3daedc28
authored
31 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Export EXT:PURIFY and remove the :CONSTANTS argument.
parent
a98eeb17
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/purify.lisp
+12
-5
12 additions, 5 deletions
code/purify.lisp
with
12 additions
and
5 deletions
code/purify.lisp
+
12
−
5
View file @
3daedc28
...
...
@@ -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.1
3
199
2
/0
3/26 03:18:51 wlott
Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/purify.lisp,v 1.1
4
199
4
/0
2/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
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment