comparison src/gc.c @ 4124:9a633a00c3f2

[xemacs-hg @ 2007-08-17 08:08:05 by crestani] 2007-08-15 Marcus Crestani <crestani@xemacs.org> * database.c (dbm_map): Add typecast. * database.c (dbm_get): Add typecast. * gc.c (gc_state_type): Declare type. * objects-tty.c (tty_find_charset_font): Add typecast. * objects-xlike-inc.c (count_hyphens): Add typecast. * objects-xlike-inc.c (endif): Add typecast.
author crestani
date Fri, 17 Aug 2007 08:08:10 +0000
parents 6595286b4bed
children 8748a3f7ceb4
comparison
equal deleted inserted replaced
4123:5333f383efbd 4124:9a633a00c3f2
105 SWEEP, 105 SWEEP,
106 FINISH_GC 106 FINISH_GC
107 }; 107 };
108 108
109 #ifndef ERROR_CHECK_GC 109 #ifndef ERROR_CHECK_GC
110 struct 110 typedef struct gc_state_type
111 { 111 {
112 enum gc_phase phase; 112 enum gc_phase phase;
113 } gc_state; 113 } gc_state_type;
114 #else /* ERROR_CHECK_GC */ 114 #else /* ERROR_CHECK_GC */
115 enum gc_stat_id 115 enum gc_stat_id
116 { 116 {
117 GC_STAT_TOTAL, 117 GC_STAT_TOTAL,
118 GC_STAT_IN_LAST_GC, 118 GC_STAT_IN_LAST_GC,
120 GC_STAT_IN_LAST_CYCLE, 120 GC_STAT_IN_LAST_CYCLE,
121 GC_STAT_IN_THIS_CYCLE, 121 GC_STAT_IN_THIS_CYCLE,
122 GC_STAT_COUNT /* has to be last */ 122 GC_STAT_COUNT /* has to be last */
123 }; 123 };
124 124
125 struct 125 typedef struct gc_state_type
126 { 126 {
127 enum gc_phase phase; 127 enum gc_phase phase;
128 double n_gc[GC_STAT_COUNT]; 128 double n_gc[GC_STAT_COUNT];
129 double n_cycles[GC_STAT_COUNT]; 129 double n_cycles[GC_STAT_COUNT];
130 double enqueued[GC_STAT_COUNT]; 130 double enqueued[GC_STAT_COUNT];
132 double repushed[GC_STAT_COUNT]; 132 double repushed[GC_STAT_COUNT];
133 double enqueued2[GC_STAT_COUNT]; 133 double enqueued2[GC_STAT_COUNT];
134 double dequeued2[GC_STAT_COUNT]; 134 double dequeued2[GC_STAT_COUNT];
135 double finalized[GC_STAT_COUNT]; 135 double finalized[GC_STAT_COUNT];
136 double freed[GC_STAT_COUNT]; 136 double freed[GC_STAT_COUNT];
137 } gc_state; 137 } gc_state_type;
138 #endif /* ERROR_CHECK_GC */ 138 #endif /* ERROR_CHECK_GC */
139
140 gc_state_type gc_state;
139 141
140 #define GC_PHASE gc_state.phase 142 #define GC_PHASE gc_state.phase
141 #define GC_SET_PHASE(p) GC_PHASE = p 143 #define GC_SET_PHASE(p) GC_PHASE = p
142 144
143 #ifdef ERROR_CHECK_GC 145 #ifdef ERROR_CHECK_GC