1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
2003-06-11 Dave Love <fx@gnu.org>
* xterm.c [BOEHM_GC]: Include gc.h.
(x_term_init): Use XGC_MALLOC.
* xfns.c [BOEHM_GC]: Include gc.h.
(make_image, free_image, make_image_cache, free_image_cache)
(cache_image):
* xfaces.c [BOEHM_GC]: Include gc.h.
(make_realized_face, free_realized_face, make_face_cache)
(free_face_cache, cache_face): Use XGC_MALLOC and friends.
* xdisp.c (display_echo_area): Use INHIBIT_GARBAGE_COLLECTION,
REENABLE_GARBAGE_COLLECTION.
* marker.c (buf_charpos_to_bytepos, Fset_marker)
(set_marker_restricted, set_marker_both)
(set_marker_restricted_both, unchain_marker)
(Fbuffer_has_markers_at, count_markers): Use SET_BUF_MARKERS,
MARKER_CHAIN.
(unchain_marker) [BOEHM_GC]: Don't use XUNMARK, XSETMARKBIT.
* macros.c [BOEHM_GC]: Include gc.h.
(Fstart_kbd_macro, store_kbd_macro_char): Use XGC_MALLOC and friends.
* keyboard.c [BOEHM_GC]: Include gc.h.
(read_char): Call GC_collect_a_little, not Fgarbage_collect.
(wipe_kboard, delete_kboard): Use XGC_FREE.
* insdel.c (check_markers, adjust_markers_for_delete)
(adjust_markers_for_replace): Use MARKER_CHAIN.
* frame.c [BOEHM_GC]: Include gc.h.
(make_terminal_frame): Use XGC_MALLOC.
* fns.c (sweep_weak_table, sweep_weak_hash_tables) [BOEHM_GC]:
Don't define.
* eval.c [BOEHM_GC]: Include gc.h.
(init_eval_once, grow_specpdl): Use XGC_MALLOC and friends.
(Feval, Ffuncall) [BOEHM_GC]: Don't call Fgarbage_collect.
* emacs.c [BOEHM_GC]: Include gc.h.
(main): Cases for BOEHM_GC.
* editfns.c (transpose_markers): Use MARKER_CHAIN.
* dispnew.c [BOEHM_GC]: Include gc.h.
(new_glyph_matrix, free_glyph_matrix, adjust_glyph_matrix)
(free_glyph_pool, new_glyph_pool, realloc_glyph_pool)
(save_current_matrix, restore_current_matrix): Use XGC_MALLOC and
friends.
* bytecode.c (unmark_byte_stack, unmark_byte_stack) [!BOEHM_GC]:
Don't define.
(BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC, MAYBE_GC) [BOEHM_GC]:
Define as null.
* buffer.h (BUF_MARKERS, SET_BUF_MARKERS): New.
* buffer.c (mask_temp): New.
(Fget_buffer_create, Fkill_buffer, Fset_buffer_multibyte): Use
SET_BUF_MARKERS, MARKER_CHAIN.
* lisp.h: Make gcpro definitions depend on BOEHM_GC.
(_LP64): Ensure it's defined if appropriate.
(mask_temp, GC_MASK_OBJECT, GC_UNMASK_OBJECT, MARKER_CHAIN): New.
(GC_NILP) [BOEHM_GC]: Define as NILP.
(INHIBIT_GARBAGE_COLLECTION, REENABLE_GARBAGE_COLLECTION)
(XGC_FREE, XGC_MALLOC, XGC_MALLOC_ATOMIC, XGC_CALLOC)
(XGC_REALLOC,XSET_MARKER_CHAIN): New.
(inhibit_gc_count): Declare
* alloc.c: Move declaration of sbrk. Maybe include gc.h. Make
marking/sweeping code dependent on BOEHM_GC.
(EXCEEDS_LISP_PTR): New.
(MAX_SAVE_STACK) [BOEHM_GC]: Define as 0.
(Vmost_positive_fixnum, Vbuffer_alist, initialized)
(GC_print_stats) [BOEHM_GC]: Declare.
(staticvec, inhibit_gc_count) [BOEHM_GC]: Don't declare.
(xcalloc): New.
(gc_out_of_memory, xgc_malloc, xgc_realloc, xgc_free)
(finalize_buffer_marker_chains, custom_finalize) [BOEHM_GC]: New.
(lisp_malloc, make_interval, allocate_string)
(allocate_string_data, make_float, Fcons, allocate_vectorlike)
(Fmake_symbol, allocate_misc, survives_gc_p, init_alloc_once)
(init_alloc): Add BOEHM_GC cases.
(lisp_free, pure_alloc, inhibit_garbage_collection) [BOEHM_GC]:
Don't define.
(float_block, float_block_index, n_float_blocks, float_free_list)
(init_float, cons_block, cons_block_index, cons_free_list)
(n_cons_blocks, init_cons, all_vectors, n_vectors, symbol_block)
(symbol_block_index, symbol_free_list, n_symbol_blocks)
(init_symbol, marker_block, marker_block_index, marker_free_list)
(n_marker_blocks, init_marker): Declare static.
(fmake_marker): Use XSET_MARKER_CHAIN. Add BOEHM_GC case.
(mark_maybe_object, mark_maybe_pointer): Use MARKER_CHAIN.
(inhibit_garbage_collection): Use Vmost_positive_fixnum.
(extra_gc_work): New, extracted from Fgarbage_collect.
(Fgarbage_collect): Add BOEHM_GC case. Use MARKER_CHAIN.
* Makefile.in (top_srcdir): Define.
(CPPFLAGS) [BOEHM_GC]: Add include path.
(gclib) [BOEHM_GC]: Define.
(mallocobj): Add gclib.
;; Local Variables:
;; coding: iso-2022-7bit
;; End:
Copyright (C) 2003 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted provided the copyright notice and this notice are preserved.
|