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.



_______________________________________________
Bug-hurd mailing list
Bug-hurd@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-hurd

Reply via email to