Thomas Jarosch wrote: > Well, I guess that's a job for the compiler/optimizer. I did a quick test by > writing two versions of a small program initializing a static variable with > zero and one version that doesn't (=zeroed in .bss). Guess what, > the size of the resulting executable stays the same. > > When I initialize the variable with a non-zero value, then the program size > increases. I tested "-O2", "-O0" and "-Os" and the results where the same. > Feel free to look at the assembler output, though I guess this optimization > is not measurable and makes the code harder to read :o) For gcc, this depends on the -fno-zero-initialized-in-bss option. Recommendations to avoid zero initialization generally come from a time when gcc didn't do this by default. Now it is more just personal preference. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html