[U-Boot] Early malloc() summary

Marek Vasut marek.vasut at gmail.com
Fri Aug 17 01:32:38 CEST 2012


Dear Graeme Russ,

> Hi Marek,
> 
> On Fri, Aug 17, 2012 at 12:50 AM, Marek Vasut <marex at denx.de> wrote:
> > Dear Graeme Russ,
> > 
> > [...]
> > 
> >> >>  2) We can pass a pointer to a driver_core struct (or whatever struct
> >> >>  it
> >> >>  
> >> >>     is that holds the 'reloc' helper function pointer). We can't pick
> >> >>     up misuse at compile time, but dm_malloc() can print a
> >> >>     meaningful message if it is called pre-relocation with no
> >> >>     relocation function. (We should add a flag to indicate that no
> >> >>     relocation helper is required which may be the case for very
> >> >>     simple drivers)
> >> > 
> >> > Yes, but it would prevent using dm_malloc(size_t size, driver *drv)
> >> > for one-time buffers inside helper functions - strdup() for instance,
> >> 
> >> Hmm, I hadn't thought of that
> > 
> > So, we're back to square 1 ?
> 
> Nope - just a slight tweak is all

What tweak ?

> Regards,
> 
> Graeme

Best regards,
Marek Vasut


More information about the U-Boot mailing list