diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2015-12-29 23:09:54 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-12-29 23:13:11 +0100 |
commit | 8c49801c8f7e3f800cabedf8fca8ccec3cf35a22 (patch) | |
tree | dd65fda72b0ed2f7860bb93ec127e6890c30d52e | |
parent | b290ced29400ff6276c8438129236f99f50c3ff9 (diff) |
drop the deprecated malloc/free hooks in hurd/mach-defpager
-rw-r--r-- | mach-defpager/kalloc.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/mach-defpager/kalloc.c b/mach-defpager/kalloc.c index ef844acc..35ddf9a7 100644 --- a/mach-defpager/kalloc.c +++ b/mach-defpager/kalloc.c @@ -34,23 +34,9 @@ #include <mach.h> #include <pthread.h> /* for spin locks */ -#include <malloc.h> /* for malloc_hook/free_hook */ #include "wiring.h" -static void init_hook (void); -static void *malloc_hook (size_t size, const void *caller); -static void free_hook (void *ptr, const void *caller); - -/* GNU libc 2.14 defines this macro to declare hook variables as volatile. - Define it as empty for older libc versions. */ -#ifndef __MALLOC_HOOK_VOLATILE -# define __MALLOC_HOOK_VOLATILE -#endif - -void (*__MALLOC_HOOK_VOLATILE __malloc_initialize_hook) (void) = init_hook; - - /* #define DEBUG */ /* @@ -264,21 +250,14 @@ kfree( void *data, } } -static void -init_hook (void) -{ - __malloc_hook = malloc_hook; - __free_hook = free_hook; -} - -static void * -malloc_hook (size_t size, const void *caller) +void * +malloc (size_t size) { return (void *) kalloc ((vm_size_t) size); } -static void -free_hook (void *ptr, const void *caller) +void +free (void *ptr) { /* Just ignore harmless attempts at cleanliness. */ /* panic("free not implemented"); */ |