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
d285b373
Commit
d285b373
authored
Dec 06, 2000
by
Gerd Moellmann
Browse files
(gc_sweep): Prevent symbols read during loadup
from being freed.
parent
fbd9f276
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
17 deletions
+27
-17
src/ChangeLog
src/ChangeLog
+3
-0
src/alloc.c
src/alloc.c
+24
-17
No files found.
src/ChangeLog
View file @
d285b373
...
...
@@ -14,6 +14,9 @@
2000-12-06 Gerd Moellmann <gerd@gnu.org>
* alloc.c (gc_sweep): Prevent symbols read during loadup
from being freed.
* xdisp.c (underlying_face_id): New function.
(handle_face_prop, face_before_or_after_it_pos): Use it
to determine the face ``under'' a string. Let strings inherit
...
...
src/alloc.c
View file @
d285b373
...
...
@@ -4764,29 +4764,36 @@ gc_sweep ()
register
int
lim
=
symbol_block_index
;
register
int
num_free
=
0
,
num_used
=
0
;
symbol_free_list
=
0
;
symbol_free_list
=
NULL
;
for
(
sblk
=
symbol_block
;
sblk
;
sblk
=
*
sprev
)
{
register
int
i
;
int
this_free
=
0
;
for
(
i
=
0
;
i
<
lim
;
i
++
)
if
(
!
XMARKBIT
(
sblk
->
symbols
[
i
].
plist
))
{
*
(
struct
Lisp_Symbol
**
)
&
sblk
->
symbols
[
i
].
value
=
symbol_free_list
;
symbol_free_list
=
&
sblk
->
symbols
[
i
];
struct
Lisp_Symbol
*
sym
=
sblk
->
symbols
;
struct
Lisp_Symbol
*
end
=
sym
+
lim
;
for
(;
sym
<
end
;
++
sym
)
{
int
pure_p
=
PURE_POINTER_P
(
sym
->
name
);
if
(
!
XMARKBIT
(
sym
->
plist
)
&&
!
pure_p
)
{
*
(
struct
Lisp_Symbol
**
)
&
sym
->
value
=
symbol_free_list
;
symbol_free_list
=
sym
;
#if GC_MARK_STACK
symbol_free_list
->
function
=
Vdead
;
symbol_free_list
->
function
=
Vdead
;
#endif
this_free
++
;
}
else
{
num_used
++
;
if
(
!
PURE_POINTER_P
(
sblk
->
symbols
[
i
].
name
))
UNMARK_STRING
(
sblk
->
symbols
[
i
].
name
);
XUNMARK
(
sblk
->
symbols
[
i
].
plist
);
}
++
this_free
;
}
else
{
++
num_used
;
if
(
!
pure_p
)
UNMARK_STRING
(
sym
->
name
);
XUNMARK
(
sym
->
plist
);
}
}
lim
=
SYMBOL_BLOCK_SIZE
;
/* If this block contains only free symbols and we have already
seen more than two blocks worth of free symbols then deallocate
...
...
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