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
4d8bd318
Commit
4d8bd318
authored
31 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Put in a weird GC hack in hope that it will prevent us from retaining lots of
info environment garbage.
parent
b509311a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/purify.lisp
+25
-11
25 additions, 11 deletions
code/purify.lisp
with
25 additions
and
11 deletions
code/purify.lisp
+
25
−
11
View file @
4d8bd318
...
...
@@ -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
6
1994/02/14 1
3:48
:2
4
ram Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/purify.lisp,v 1.1
7
1994/02/14 1
4:05
:2
3
ram Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -23,6 +23,28 @@
(
static-roots
c-call:unsigned-long
)
(
read-only-roots
c-call:unsigned-long
))
;;; COMPACT-ENVIRONMENT-AUX -- Internal
;;;
;;; Compact the info environment. Written with gratuitous recursion to
;;; make sure that our (and compact-info-environment's) local variables are
;;; above the stack top when purify runs.
;;;
(
defun
compact-environment-aux
(
name
n
)
(
cond
((
zerop
n
)
(
let
((
old-ie
(
car
*info-environment*
)))
(
setq
*info-environment*
(
list*
(
make-info-environment
:name
"Working"
)
(
compact-info-environment
(
first
*info-environment*
)
:name
name
)
(
rest
*info-environment*
)))
(
shrink-vector
(
c::volatile-info-env-table
old-ie
)
0
)))
(
t
(
compact-environment-aux
name
(
1-
n
))
n
)))
(
defun
purify
(
&key
root-structures
(
environment-name
"Auxiliary"
))
"This function optimizes garbage collection by moving all currently live
objects into non-collected storage. ROOT-STRUCTURES is an optional list of
...
...
@@ -35,16 +57,8 @@
ENVIRONMENT-NAME is gratuitous documentation for compacted version of the
current global environment (as seen in C::*INFO-ENVIRONMENT*.) If NIL is
supplied, then environment compaction is inhibited."
(
when
environment-name
(
let
((
old-ie
(
car
*info-environment*
)))
(
setq
*info-environment*
(
list*
(
make-info-environment
:name
"Working"
)
(
compact-info-environment
(
first
*info-environment*
)
:name
environment-name
)
(
rest
*info-environment*
)))
;; next 2 lines for GC.
(
shrink-vector
(
c::volatile-info-env-table
old-ie
)
0
)
(
setq
old-ie
nil
)))
(
when
environment-name
(
compact-environment-aux
environment-name
200
))
(
let
((
*gc-notify-before*
#'
(
lambda
(
bytes-in-use
)
...
...
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