platform_ops.malloc() vs. realloc()
David Gibson
david at gibson.dropbear.id.au
Thu Feb 22 21:25:53 EST 2007
On Thu, Feb 22, 2007 at 11:14:36AM +0100, Geert Uytterhoeven wrote:
>
> arch/powerpc/boot/ops.h has:
>
> | /* Platform specific operations */
> | struct platform_ops {
> | void (*fixups)(void);
> | void (*image_hdr)(const void *);
> | void * (*malloc)(u32 size);
> | void (*free)(void *ptr);
> | void * (*realloc)(void *ptr, unsigned long size);
> | void (*exit)(void);
> | };
>
> Is there a specific reason why the size parameters of malloc() and realloc()
> differ in type?
Not as far as I'm aware, I believe it's just a wart. The zImage is
always compiler 32-bit, so they're actually the same thing. I'm
actually hoping to get rid of malloc() and realloc() at some point.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
More information about the Linuxppc-dev
mailing list