[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kalloc.c and recent gcc's
From: |
Neal H. Walfield |
Subject: |
Re: kalloc.c and recent gcc's |
Date: |
Sun, 28 Aug 2005 21:00:41 +0100 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.4 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) |
> What about the following fix? This should fix things so that we don't
> use vanilla malloc/free, and only use our own versions.
This looks okay. Has it been tested?
> +#include <malloc.h> /* for malloc_hook/free_hook */
> +
> +void *init_hook (void);
> +void *malloc_hook (size_t size, const void *caller);
> +void free_hook (void *ptr, const void *caller);
Can't these be made static?
> +
> +void (*__malloc_initialize_hook) (void) = (void *) init_hook;
Do you really need the void * cast?
- kalloc.c and recent gcc's, Alfred M. Szmidt, 2005/08/25
- Re: kalloc.c and recent gcc's,
Neal H. Walfield <=
- Re: kalloc.c and recent gcc's, Thomas Schwinge, 2005/08/28
- Re: kalloc.c and recent gcc's, Thomas Bushnell BSG, 2005/08/28
- Re: kalloc.c and recent gcc's, Thomas Schwinge, 2005/08/28
- Re: kalloc.c and recent gcc's, Alfred M. Szmidt, 2005/08/31
- Re: kalloc.c and recent gcc's, Thomas Schwinge, 2005/08/31
- Re: kalloc.c and recent gcc's, Alfred M. Szmidt, 2005/08/31