Mercurial > hg > xemacs-beta
comparison src/profile.c @ 442:abe6d1db359e r21-2-36
Import from CVS: tag r21-2-36
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:35:02 +0200 |
parents | 9d177e8d4150 |
children | c33ae14dd6d0 |
comparison
equal
deleted
inserted
replaced
441:72a7cfa4a488 | 442:abe6d1db359e |
---|---|
133 Allocating memory in a signal handler is BAD BAD BAD. | 133 Allocating memory in a signal handler is BAD BAD BAD. |
134 If you are using the non-mmap rel-alloc code, you might | 134 If you are using the non-mmap rel-alloc code, you might |
135 lose because of this. Even worse, if the memory allocation | 135 lose because of this. Even worse, if the memory allocation |
136 fails, the `error' generated whacks everything hard. */ | 136 fails, the `error' generated whacks everything hard. */ |
137 long count; | 137 long count; |
138 CONST void *vval; | 138 const void *vval; |
139 | 139 |
140 if (gethash (LISP_TO_VOID (fun), big_profile_table, &vval)) | 140 if (gethash (LISP_TO_VOID (fun), big_profile_table, &vval)) |
141 count = (long) vval; | 141 count = (long) vval; |
142 else | 142 else |
143 count = 0; | 143 count = 0; |
144 count++; | 144 count++; |
145 vval = (CONST void *) count; | 145 vval = (const void *) count; |
146 puthash (LISP_TO_VOID (fun), (void *) vval, big_profile_table); | 146 puthash (LISP_TO_VOID (fun), (void *) vval, big_profile_table); |
147 } | 147 } |
148 | 148 |
149 inside_profiling = 0; | 149 inside_profiling = 0; |
150 } | 150 } |
224 { | 224 { |
225 Lisp_Object accum; | 225 Lisp_Object accum; |
226 }; | 226 }; |
227 | 227 |
228 static int | 228 static int |
229 get_profiling_info_maphash (CONST void *void_key, | 229 get_profiling_info_maphash (const void *void_key, |
230 void *void_val, | 230 void *void_val, |
231 void *void_closure) | 231 void *void_closure) |
232 { | 232 { |
233 /* This function does not GC */ | 233 /* This function does not GC */ |
234 Lisp_Object key; | 234 Lisp_Object key; |
262 } | 262 } |
263 return closure.accum; | 263 return closure.accum; |
264 } | 264 } |
265 | 265 |
266 static int | 266 static int |
267 mark_profiling_info_maphash (CONST void *void_key, | 267 mark_profiling_info_maphash (const void *void_key, |
268 void *void_val, | 268 void *void_val, |
269 void *void_closure) | 269 void *void_closure) |
270 { | 270 { |
271 Lisp_Object key; | 271 Lisp_Object key; |
272 | 272 |