diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/alloc.c b/src/alloc.c index e0f07cc5f5a..84b9007cdd5 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -329,23 +329,23 @@ Lisp_Object Vpost_gc_hook, Qpost_gc_hook; | |||
| 329 | Lisp_Object Vgc_elapsed; /* accumulated elapsed time in GC */ | 329 | Lisp_Object Vgc_elapsed; /* accumulated elapsed time in GC */ |
| 330 | EMACS_INT gcs_done; /* accumulated GCs */ | 330 | EMACS_INT gcs_done; /* accumulated GCs */ |
| 331 | 331 | ||
| 332 | static void mark_buffer P_ ((Lisp_Object)); | 332 | static void mark_buffer (Lisp_Object); |
| 333 | static void mark_terminals P_ ((void)); | 333 | static void mark_terminals (void); |
| 334 | extern void mark_kboards P_ ((void)); | 334 | extern void mark_kboards (void); |
| 335 | extern void mark_ttys P_ ((void)); | 335 | extern void mark_ttys (void); |
| 336 | extern void mark_backtrace P_ ((void)); | 336 | extern void mark_backtrace (void); |
| 337 | static void gc_sweep P_ ((void)); | 337 | static void gc_sweep (void); |
| 338 | static void mark_glyph_matrix P_ ((struct glyph_matrix *)); | 338 | static void mark_glyph_matrix (struct glyph_matrix *); |
| 339 | static void mark_face_cache P_ ((struct face_cache *)); | 339 | static void mark_face_cache (struct face_cache *); |
| 340 | 340 | ||
| 341 | #ifdef HAVE_WINDOW_SYSTEM | 341 | #ifdef HAVE_WINDOW_SYSTEM |
| 342 | extern void mark_fringe_data P_ ((void)); | 342 | extern void mark_fringe_data (void); |
| 343 | #endif /* HAVE_WINDOW_SYSTEM */ | 343 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 344 | 344 | ||
| 345 | static struct Lisp_String *allocate_string P_ ((void)); | 345 | static struct Lisp_String *allocate_string (void); |
| 346 | static void compact_small_strings P_ ((void)); | 346 | static void compact_small_strings (void); |
| 347 | static void free_large_strings P_ ((void)); | 347 | static void free_large_strings (void); |
| 348 | static void sweep_strings P_ ((void)); | 348 | static void sweep_strings (void); |
| 349 | 349 | ||
| 350 | extern int message_enable_multibyte; | 350 | extern int message_enable_multibyte; |
| 351 | 351 | ||
| @@ -369,8 +369,8 @@ enum mem_type | |||
| 369 | MEM_TYPE_VECTORLIKE | 369 | MEM_TYPE_VECTORLIKE |
| 370 | }; | 370 | }; |
| 371 | 371 | ||
| 372 | static POINTER_TYPE *lisp_align_malloc P_ ((size_t, enum mem_type)); | 372 | static POINTER_TYPE *lisp_align_malloc (size_t, enum mem_type); |
| 373 | static POINTER_TYPE *lisp_malloc P_ ((size_t, enum mem_type)); | 373 | static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); |
| 374 | void refill_memory_reserve (); | 374 | void refill_memory_reserve (); |
| 375 | 375 | ||
| 376 | 376 | ||
| @@ -452,31 +452,31 @@ static void *min_heap_address, *max_heap_address; | |||
| 452 | static struct mem_node mem_z; | 452 | static struct mem_node mem_z; |
| 453 | #define MEM_NIL &mem_z | 453 | #define MEM_NIL &mem_z |
| 454 | 454 | ||
| 455 | static POINTER_TYPE *lisp_malloc P_ ((size_t, enum mem_type)); | 455 | static POINTER_TYPE *lisp_malloc (size_t, enum mem_type); |
| 456 | static struct Lisp_Vector *allocate_vectorlike P_ ((EMACS_INT)); | 456 | static struct Lisp_Vector *allocate_vectorlike (EMACS_INT); |
| 457 | static void lisp_free P_ ((POINTER_TYPE *)); | 457 | static void lisp_free (POINTER_TYPE *); |
| 458 | static void mark_stack P_ ((void)); | 458 | static void mark_stack (void); |
| 459 | static int live_vector_p P_ ((struct mem_node *, void *)); | 459 | static int live_vector_p (struct mem_node *, void *); |
| 460 | static int live_buffer_p P_ ((struct mem_node *, void *)); | 460 | static int live_buffer_p (struct mem_node *, void *); |
| 461 | static int live_string_p P_ ((struct mem_node *, void *)); | 461 | static int live_string_p (struct mem_node *, void *); |
| 462 | static int live_cons_p P_ ((struct mem_node *, void *)); | 462 | static int live_cons_p (struct mem_node *, void *); |
| 463 | static int live_symbol_p P_ ((struct mem_node *, void *)); | 463 | static int live_symbol_p (struct mem_node *, void *); |
| 464 | static int live_float_p P_ ((struct mem_node *, void *)); | 464 | static int live_float_p (struct mem_node *, void *); |
| 465 | static int live_misc_p P_ ((struct mem_node *, void *)); | 465 | static int live_misc_p (struct mem_node *, void *); |
| 466 | static void mark_maybe_object P_ ((Lisp_Object)); | 466 | static void mark_maybe_object (Lisp_Object); |
| 467 | static void mark_memory P_ ((void *, void *, int)); | 467 | static void mark_memory (void *, void *, int); |
| 468 | static void mem_init P_ ((void)); | 468 | static void mem_init (void); |
| 469 | static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type)); | 469 | static struct mem_node *mem_insert (void *, void *, enum mem_type); |
| 470 | static void mem_insert_fixup P_ ((struct mem_node *)); | 470 | static void mem_insert_fixup (struct mem_node *); |
| 471 | static void mem_rotate_left P_ ((struct mem_node *)); | 471 | static void mem_rotate_left (struct mem_node *); |
| 472 | static void mem_rotate_right P_ ((struct mem_node *)); | 472 | static void mem_rotate_right (struct mem_node *); |
| 473 | static void mem_delete P_ ((struct mem_node *)); | 473 | static void mem_delete (struct mem_node *); |
| 474 | static void mem_delete_fixup P_ ((struct mem_node *)); | 474 | static void mem_delete_fixup (struct mem_node *); |
| 475 | static INLINE struct mem_node *mem_find P_ ((void *)); | 475 | static INLINE struct mem_node *mem_find (void *); |
| 476 | 476 | ||
| 477 | 477 | ||
| 478 | #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS | 478 | #if GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS |
| 479 | static void check_gcpros P_ ((void)); | 479 | static void check_gcpros (void); |
| 480 | #endif | 480 | #endif |
| 481 | 481 | ||
| 482 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ | 482 | #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ |
| @@ -495,7 +495,7 @@ static Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag}; | |||
| 495 | 495 | ||
| 496 | static int staticidx = 0; | 496 | static int staticidx = 0; |
| 497 | 497 | ||
| 498 | static POINTER_TYPE *pure_alloc P_ ((size_t, int)); | 498 | static POINTER_TYPE *pure_alloc (size_t, int); |
| 499 | 499 | ||
| 500 | 500 | ||
| 501 | /* Value is SZ rounded up to the next multiple of ALIGNMENT. | 501 | /* Value is SZ rounded up to the next multiple of ALIGNMENT. |
| @@ -1164,14 +1164,14 @@ allocate_buffer () | |||
| 1164 | there's no need to block input around malloc. */ | 1164 | there's no need to block input around malloc. */ |
| 1165 | 1165 | ||
| 1166 | #ifndef DOUG_LEA_MALLOC | 1166 | #ifndef DOUG_LEA_MALLOC |
| 1167 | extern void * (*__malloc_hook) P_ ((size_t, const void *)); | 1167 | extern void * (*__malloc_hook) (size_t, const void *); |
| 1168 | extern void * (*__realloc_hook) P_ ((void *, size_t, const void *)); | 1168 | extern void * (*__realloc_hook) (void *, size_t, const void *); |
| 1169 | extern void (*__free_hook) P_ ((void *, const void *)); | 1169 | extern void (*__free_hook) (void *, const void *); |
| 1170 | /* Else declared in malloc.h, perhaps with an extra arg. */ | 1170 | /* Else declared in malloc.h, perhaps with an extra arg. */ |
| 1171 | #endif /* DOUG_LEA_MALLOC */ | 1171 | #endif /* DOUG_LEA_MALLOC */ |
| 1172 | static void * (*old_malloc_hook) P_ ((size_t, const void *)); | 1172 | static void * (*old_malloc_hook) (size_t, const void *); |
| 1173 | static void * (*old_realloc_hook) P_ ((void *, size_t, const void*)); | 1173 | static void * (*old_realloc_hook) (void *, size_t, const void*); |
| 1174 | static void (*old_free_hook) P_ ((void*, const void*)); | 1174 | static void (*old_free_hook) (void*, const void*); |
| 1175 | 1175 | ||
| 1176 | /* This function is used as the hook for free to call. */ | 1176 | /* This function is used as the hook for free to call. */ |
| 1177 | 1177 | ||
| @@ -1767,8 +1767,8 @@ init_strings () | |||
| 1767 | 1767 | ||
| 1768 | static int check_string_bytes_count; | 1768 | static int check_string_bytes_count; |
| 1769 | 1769 | ||
| 1770 | static void check_string_bytes P_ ((int)); | 1770 | static void check_string_bytes (int); |
| 1771 | static void check_sblock P_ ((struct sblock *)); | 1771 | static void check_sblock (struct sblock *); |
| 1772 | 1772 | ||
| 1773 | #define CHECK_STRING_BYTES(S) STRING_BYTES (S) | 1773 | #define CHECK_STRING_BYTES(S) STRING_BYTES (S) |
| 1774 | 1774 | ||