[U-Boot] RFC: introduce malloc_cleared() ?

Wolfgang Denk wd at denx.de
Thu Oct 14 10:13:02 CEST 2010


Dear Reinhard Meyer,

In message <4CB6A110.6080101 at emk-elektronik.de> you wrote:
> 
> instead of adding or having the sequence of
> 
> malloc(), memset()
> 
> in all places where a definitely sane initialized structure
> is required it would make more sense to introduce a single
> function doing both. (The standard "calloc()" does not suit well
> here.) Overall that should even slightly decrease code size.

And why exactly does calloc() not fit?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A verbal contract isn't worth the paper it's written on.
                                                    -- Samuel Goldwyn


More information about the U-Boot mailing list