Hi,
On Fri, Jun 24, 2016 at 09:17:07AM +0000, David Laight wrote:
From: Phil Sutter
quoted
Sent: 23 June 2016 18:34
This is v3 of my C99-style initializer related patch series.
...
It would be interesting to know how this affect the kernel code size?
While gcc will generate a memset() call for 'struct foo = {0}' if you
initialise some members it might generate explicit zeroing instructions
for all the other words of the structure.
I've seen gcc use memset() to zero the end of a structure, it may use
memset() for large gaps earlier in the structure.
But if you initialise a byte half way down you are very unlikely to
get a single memset() and then a write to the single location.
I did a standard build ('make distclean; make') before and after this
commit in my tree. The 'ip' binary didn't change in size at all (quite
surprising), the 'tc' binary shrunk by 48 bytes.
Cheers, Phil