Uninitialized externals and statics.

T. William Wells bill at twwells.com
Sat Aug 19 15:37:11 AEST 1989


In article <478.nlhp3 at oracle.nl> bengsig at oracle.nl (Bjorn Engsig) writes:
: The default initialization of statics and externals without explicit inital
: values also has the advantage (at least on some systems) that the load
: module will be smaller.  If you explicitly initialize to zero, all those
: zeroes will be stored in the file.

At one point, we got toasted by some of our customers because our
executables were excessively large. It seems that one of our
programmers did things like:

int     Array[1000] = {0};

This sort of thing made the difference between a product that could
be shipped on one floppy and one that required two.

Guk.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Comp.lang.c mailing list