From: Wolfgang Denk Date: Thu, 14 Oct 2010 10:13:02 +0200 Subject: [U-Boot] RFC: introduce malloc_cleared() ? In-Reply-To: <4CB6A110.6080101@emk-elektronik.de> References: <4CB6A110.6080101@emk-elektronik.de> Message-ID: <20101014081302.226391365CF@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Reinhard Meyer, In message <4CB6A110.6080101@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