lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-devel] [bug #20254] Initializing static/global variables


From: Goldschmidt Simon
Subject: RE: [lwip-devel] [bug #20254] Initializing static/global variables
Date: Tue, 26 Jun 2007 12:32:39 +0200

> So what about removing all the extra 
> 
> xxxx = 0;
> xxxx = NULL;
> 
> for all globals and static variables, if there are any?
> 
> These should be taken care of the the compiler clearing the 
> BSS on startup, well all the compilers I use work this way.
> 
> Should not make the code any larger
> 
> Also change static tables to const tables (sockets.c) moves 
> data that is only read into the rom data section, no more wasted ram

I think that's a good idea. And that is why I'd like to leave the bug
open, not because of the buggy compiler.

Note that many pieces of embedded software that are supposed to be
ultra-portable provide compile switches whether to initialize the data
or not. I'll try to search for some C definition if the initialization
to zero is mandatory or not.


Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]