Mercurial > emacs
comparison src/alloc.c @ 30914:6362b1fc09f2
(lisp_malloc): Declare with POINTER_TYPE.
[SYSTEM_MALLOC]: Make decls in malloc.h conditional on
DOUG_LEA_MALLOC.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 17 Aug 2000 14:01:09 +0000 |
parents | 8ee3740aaf60 |
children | 6a0caa788013 |
comparison
equal
deleted
inserted
replaced
30913:fa7ad139efa1 | 30914:6362b1fc09f2 |
---|---|
284 on free lists recognizable in O(1). */ | 284 on free lists recognizable in O(1). */ |
285 | 285 |
286 Lisp_Object Vdead; | 286 Lisp_Object Vdead; |
287 | 287 |
288 struct mem_node; | 288 struct mem_node; |
289 static void *lisp_malloc P_ ((size_t, enum mem_type)); | 289 static POINTER_TYPE *lisp_malloc P_ ((size_t, enum mem_type)); |
290 static void lisp_free P_ ((POINTER_TYPE *)); | 290 static void lisp_free P_ ((POINTER_TYPE *)); |
291 static void mark_stack P_ ((void)); | 291 static void mark_stack P_ ((void)); |
292 static void init_stack P_ ((Lisp_Object *)); | 292 static void init_stack P_ ((Lisp_Object *)); |
293 static int live_vector_p P_ ((struct mem_node *, void *)); | 293 static int live_vector_p P_ ((struct mem_node *, void *)); |
294 static int live_buffer_p P_ ((struct mem_node *, void *)); | 294 static int live_buffer_p P_ ((struct mem_node *, void *)); |
539 might call malloc, so we can't really protect them unless you're | 539 might call malloc, so we can't really protect them unless you're |
540 using GNU malloc. Fortunately, most of the major operating can use | 540 using GNU malloc. Fortunately, most of the major operating can use |
541 GNU malloc. */ | 541 GNU malloc. */ |
542 | 542 |
543 #ifndef SYSTEM_MALLOC | 543 #ifndef SYSTEM_MALLOC |
544 | 544 #ifndef DOUG_LEA_MALLOC |
545 extern void * (*__malloc_hook) (); | 545 extern void * (*__malloc_hook) P_ ((size_t)); |
546 extern void * (*__realloc_hook) P_ ((void *, size_t)); | |
547 extern void (*__free_hook) P_ ((void *)); | |
548 /* Else declared in malloc.h, perhaps with an extra arg. */ | |
549 #endif /* DOUG_LEA_MALLOC */ | |
546 static void * (*old_malloc_hook) (); | 550 static void * (*old_malloc_hook) (); |
547 extern void * (*__realloc_hook) (); | |
548 static void * (*old_realloc_hook) (); | 551 static void * (*old_realloc_hook) (); |
549 extern void (*__free_hook) (); | |
550 static void (*old_free_hook) (); | 552 static void (*old_free_hook) (); |
551 static void *emacs_blocked_malloc P_ ((size_t)); | |
552 static void *emacs_blocked_realloc P_ ((void *, size_t)); | |
553 | 553 |
554 /* This function is used as the hook for free to call. */ | 554 /* This function is used as the hook for free to call. */ |
555 | 555 |
556 static void | 556 static void |
557 emacs_blocked_free (ptr) | 557 emacs_blocked_free (ptr) |