[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: kalloc.c and recent gcc's
From: |
Alfred M. Szmidt |
Subject: |
Re: kalloc.c and recent gcc's |
Date: |
Wed, 31 Aug 2005 16:52:32 +0200 |
Shall I do any further testing (and how to do that)?
I told you, attach gdb to defpager, and put a breakpoint in malloc.
Since this is a hook, any usual code from malloc shouldn't be run.
> > +#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?
Sure.
> > +
> > +void (*__malloc_initialize_hook) (void) = (void *) init_hook;
>
> Do you really need the void * cast?
Yes.
- kalloc.c and recent gcc's, Alfred M. Szmidt, 2005/08/25
- Re: kalloc.c and recent gcc's, Neal H. Walfield, 2005/08/28
- 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 <=