[U-Boot-Users] memory allocation

Wolfgang Denk wd at denx.de
Thu Jul 15 09:51:44 CEST 2004


Dear Lars,

in message <96A7A8B8A8ACBA4DAF7FD558BD32799BF56086 at svex01001> you wrote:
> 
> > BTW: the same is done on other architectures, too.
> 
> But not for all - so one way or the other, it's not correct.
> Unless there is less paranoia for certain architectures ;-)

...or different developers.

> I consider zeroeing out this memory area as a way to obscure
> bugs, by allowing faulty code to run nevertheless. I guess it's a thin

This is one way to see things. Another one is that zeroing the memory
is a simple but efficient way to make sure that this memory is really
writable. Remember that we often have to  deal  with  green  hardware
which  may  fail in funny ways, or with the effects of mis-configured
systems (like setting a size for the malloc arena that is bigger than
the available RAM), etc. This simple  memset()  gives  you  a  pretty
clear indication of such errors.

> line between improving stability and catering bad code.

In this case I tend to disagree.


Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"Those who will be able to conquer software will be able  to  conquer
the world."                 - Tadahiro Sekimoto, president, NEC Corp.




More information about the U-Boot mailing list