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
03b023ef
Commit
03b023ef
authored
25 years ago
by
dtc
Browse files
Options
Downloads
Patches
Plain Diff
On the x86 port do not zero the dynamic space here after purify
because the necessary pages are zeroed by gc_free_heap.
parent
8aa29486
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
lisp/purify.c
+24
-18
24 additions, 18 deletions
lisp/purify.c
with
24 additions
and
18 deletions
lisp/purify.c
+
24
−
18
View file @
03b023ef
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
and x86/GENCGC stack scavenging, by Douglas Crosher, 1996, 1997,
and x86/GENCGC stack scavenging, by Douglas Crosher, 1996, 1997,
1998.
1998.
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/purify.c,v 1.1
6 1998/03/21 08:15:01
dtc Exp $
$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/purify.c,v 1.1
7 2000/01/19 18:11:13
dtc Exp $
*/
*/
#include
<stdio.h>
#include
<stdio.h>
...
@@ -1517,12 +1517,16 @@ int purify(lispobj static_roots, lispobj read_only_roots)
...
@@ -1517,12 +1517,16 @@ int purify(lispobj static_roots, lispobj read_only_roots)
os_zero
((
os_vm_address_t
)
current_dynamic_space
,
os_zero
((
os_vm_address_t
)
current_dynamic_space
,
(
os_vm_size_t
)
DYNAMIC_SPACE_SIZE
);
(
os_vm_size_t
)
DYNAMIC_SPACE_SIZE
);
#else
#else
#if !defined(GENCGC)
os_zero
((
os_vm_address_t
)
current_dynamic_space
,
os_zero
((
os_vm_address_t
)
current_dynamic_space
,
(
os_vm_size_t
)
DYNAMIC_SPACE_SIZE
);
(
os_vm_size_t
)
DYNAMIC_SPACE_SIZE
);
#endif
#endif
#endif
/* Zero stack. Note the stack is also zeroed by sub-gc calling
/*
scrub-control-stack - this zeros the stack on the x86. */
* Zero stack. Note the stack is also zeroed by sub-gc calling
* scrub-control-stack - this zeros the stack on the x86.
*/
#ifndef i386
#ifndef i386
os_zero
((
os_vm_address_t
)
current_control_stack_pointer
,
os_zero
((
os_vm_address_t
)
current_control_stack_pointer
,
(
os_vm_size_t
)
(
CONTROL_STACK_SIZE
-
(
os_vm_size_t
)
(
CONTROL_STACK_SIZE
-
...
@@ -1533,24 +1537,26 @@ int purify(lispobj static_roots, lispobj read_only_roots)
...
@@ -1533,24 +1537,26 @@ int purify(lispobj static_roots, lispobj read_only_roots)
#if defined(WANT_CGC) && defined(STATIC_BLUE_BAG)
#if defined(WANT_CGC) && defined(STATIC_BLUE_BAG)
{
{
lispobj
bag
=
SymbolValue
(
STATIC_BLUE_BAG
);
lispobj
bag
=
SymbolValue
(
STATIC_BLUE_BAG
);
struct
cons
*
cons
=
(
struct
cons
*
)
static_free
;
struct
cons
*
cons
=
(
struct
cons
*
)
static_free
;
struct
cons
*
pair
=
cons
+
1
;
struct
cons
*
pair
=
cons
+
1
;
static_free
+=
2
*
WORDS_PER_CONS
;
static_free
+=
2
*
WORDS_PER_CONS
;
if
(
bag
==
type_UnboundMarker
)
if
(
bag
==
type_UnboundMarker
)
bag
=
NIL
;
bag
=
NIL
;
cons
->
cdr
=
bag
;
cons
->
cdr
=
bag
;
cons
->
car
=
(
lispobj
)
pair
|
type_ListPointer
;
cons
->
car
=
(
lispobj
)
pair
|
type_ListPointer
;
pair
->
car
=
(
lispobj
)
static_end
;
pair
->
car
=
(
lispobj
)
static_end
;
pair
->
cdr
=
(
lispobj
)
static_free
;
pair
->
cdr
=
(
lispobj
)
static_free
;
bag
=
(
lispobj
)
cons
|
type_ListPointer
;
bag
=
(
lispobj
)
cons
|
type_ListPointer
;
SetSymbolValue
(
STATIC_BLUE_BAG
,
bag
);
SetSymbolValue
(
STATIC_BLUE_BAG
,
bag
);
}
}
#endif
#endif
/* It helps to update the heap free pointers so that free_heap can
/*
verify after it's done. */
* It helps to update the heap free pointers so that free_heap can
SetSymbolValue
(
READ_ONLY_SPACE_FREE_POINTER
,
(
lispobj
)
read_only_free
);
* verify after it's done.
SetSymbolValue
(
STATIC_SPACE_FREE_POINTER
,
(
lispobj
)
static_free
);
*/
SetSymbolValue
(
READ_ONLY_SPACE_FREE_POINTER
,
(
lispobj
)
read_only_free
);
SetSymbolValue
(
STATIC_SPACE_FREE_POINTER
,
(
lispobj
)
static_free
);
#if !defined(ibmrt) && !defined(i386)
#if !defined(ibmrt) && !defined(i386)
current_dynamic_space_free_pointer
=
current_dynamic_space
;
current_dynamic_space_free_pointer
=
current_dynamic_space
;
...
@@ -1558,7 +1564,7 @@ int purify(lispobj static_roots, lispobj read_only_roots)
...
@@ -1558,7 +1564,7 @@ int purify(lispobj static_roots, lispobj read_only_roots)
#if defined(WANT_CGC) && defined(X86_CGC_ACTIVE_P)
#if defined(WANT_CGC) && defined(X86_CGC_ACTIVE_P)
/* X86 using CGC */
/* X86 using CGC */
if
(
SymbolValue
(
X86_CGC_ACTIVE_P
)
!=
T
)
if
(
SymbolValue
(
X86_CGC_ACTIVE_P
)
!=
T
)
SetSymbolValue
(
ALLOCATION_POINTER
,
(
lispobj
)
current_dynamic_space
);
SetSymbolValue
(
ALLOCATION_POINTER
,
(
lispobj
)
current_dynamic_space
);
else
else
cgc_free_heap
();
cgc_free_heap
();
#else
#else
...
@@ -1566,7 +1572,7 @@ int purify(lispobj static_roots, lispobj read_only_roots)
...
@@ -1566,7 +1572,7 @@ int purify(lispobj static_roots, lispobj read_only_roots)
gc_free_heap
();
gc_free_heap
();
#else
#else
/* ibmrt using GC */
/* ibmrt using GC */
SetSymbolValue
(
ALLOCATION_POINTER
,
(
lispobj
)
current_dynamic_space
);
SetSymbolValue
(
ALLOCATION_POINTER
,
(
lispobj
)
current_dynamic_space
);
#endif
#endif
#endif
#endif
#endif
#endif
...
@@ -1575,11 +1581,11 @@ int purify(lispobj static_roots, lispobj read_only_roots)
...
@@ -1575,11 +1581,11 @@ int purify(lispobj static_roots, lispobj read_only_roots)
/* Call the scavenger hook functions */
/* Call the scavenger hook functions */
{
{
struct
scavenger_hook
*
sh
;
struct
scavenger_hook
*
sh
;
for
(
sh
=
PTR
((
int
)
scavenger_hooks
);
sh
!=
PTR
(
NIL
);)
{
for
(
sh
=
PTR
((
int
)
scavenger_hooks
);
sh
!=
PTR
(
NIL
);)
{
struct
scavenger_hook
*
sh_next
=
PTR
((
int
)
sh
->
next
);
struct
scavenger_hook
*
sh_next
=
PTR
((
int
)
sh
->
next
);
funcall0
(
sh
->
function
);
funcall0
(
sh
->
function
);
sh
->
next
=
NULL
;
sh
->
next
=
NULL
;
sh
=
sh_next
;
sh
=
sh_next
;
}
}
scavenger_hooks
=
NIL
;
scavenger_hooks
=
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