[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kalloc.c and recent gcc's

From: Thomas Schwinge
Subject: Re: kalloc.c and recent gcc's
Date: Sun, 28 Aug 2005 23:03:31 +0200
User-agent: Mutt/1.5.9i

On Sun, Aug 28, 2005 at 09:00:41PM +0100, Neal H. Walfield wrote:
> > 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?

Michael Banck and I have been running the fixed binary
(/hurd/mach-defpager) and didn't notice any oddities.
I put the binary (non-stripped and stripped) at
<URL:http://nic-nac-project.de/~schwinge/tmp/mach-defpager.bz2> and
in case that somebody else want's to give it a try.

Shall I do any further testing (and how to do that)?

> > +#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?

It compiles cleanly when they are made static.

> > +
> > +void (*__malloc_initialize_hook) (void) = (void *) init_hook;
> Do you really need the void * cast?

The cast avoids the following warning:
../../hurd-0/mach-defpager/../serverboot/kalloc.c:43: warning: initialization 
from incompatible pointer type


reply via email to

[Prev in Thread] Current Thread [Next in Thread]