Thread (12 messages) flat view 12 messages, 3 authors, 2016-06-24

RE: [iproute PATCH v3 0/6] Big C99 style initializer rework

From: David Laight <hidden>
Date: 2016-06-24 09:19:29

From: Phil Sutter
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.

	David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help