Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
785cd37f
Commit
785cd37f
authored
Sep 19, 1992
by
Richard M. Stallman
Browse files
(mark_object): Save last 500 values of objptr.
Check for clobberage of ptr, when marking a vector.
parent
37bef230
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
src/alloc.c
src/alloc.c
+14
-1
No files found.
src/alloc.c
View file @
785cd37f
...
...
@@ -1269,6 +1269,10 @@ clear_marks ()
lives in the last slot in the chain. We recognize the end
because it is < (unsigned) STRING_BLOCK_SIZE. */
#define LAST_MARKED_SIZE 500
Lisp_Object
*
last_marked
[
LAST_MARKED_SIZE
];
int
last_marked_index
;
static
void
mark_object
(
objptr
)
Lisp_Object
*
objptr
;
...
...
@@ -1284,6 +1288,10 @@ mark_object (objptr)
&&
(
PNTR_COMPARISON_TYPE
)
XPNTR
(
obj
)
>=
(
PNTR_COMPARISON_TYPE
)
pure
)
return
;
last_marked
[
last_marked_index
++
]
=
objptr
;
if
(
last_marked_index
==
LAST_MARKED_SIZE
)
last_marked_index
=
0
;
#ifdef SWITCH_ENUM_BUG
switch
((
int
)
XGCTYPE
(
obj
))
#else
...
...
@@ -1328,12 +1336,17 @@ mark_object (objptr)
{
register
struct
Lisp_Vector
*
ptr
=
XVECTOR
(
obj
);
register
int
size
=
ptr
->
size
;
struct
Lisp_Vector
*
volatile
ptr1
=
ptr
;
register
int
i
;
if
(
size
&
ARRAY_MARK_FLAG
)
break
;
/* Already marked */
ptr
->
size
|=
ARRAY_MARK_FLAG
;
/* Else mark it */
for
(
i
=
0
;
i
<
size
;
i
++
)
/* and then mark its elements */
mark_object
(
&
ptr
->
contents
[
i
]);
{
if
(
ptr
!=
ptr1
)
abort
();
mark_object
(
&
ptr
->
contents
[
i
]);
}
}
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment