[Patch] TEST - prom-libc malloc

Paul Nasrat pnasrat at redhat.com
Thu Apr 19 19:30:16 EST 2007


On Wed, 2007-04-18 at 11:54 -0500, Nathan Lynch wrote:

Thanks for the comments - as I said it's early stages for this one.

> Adding an atoi function seems unrelated to the rest of the patch?

Indeed I'll split that out it probably was a pull of extra stuff from
prom-libc.

> Declarations should go in headers, not .c files.

Yup I'll fix up for final 
> 
> > -static char *malloc_ptr = 0;
> > -static char *malloc_top = 0;
> > -static char *last_alloc = 0;
> > +/*** bits/malloc.h ***/
> > +struct __alloc_area
> > +{
> > +	struct __alloc_area *next;
> > +	unsigned int length;
> > +	long long foo;
> > +};
> 
> What is foo?  Needs a comment, at least.

I'll look into.

> In Linux it's considered useful for "free" functions to handle NULL
> and not treat it as a bug.  It can simplify callers and reduce code
> size.  Perhaps not a big deal for yaboot.

Sounds reasonable approach for yaboot also.

Paul




More information about the Yaboot-devel mailing list