2 ms·
I don't think memset is required to zero out any padding, because the effects of this are not observable.
by saagarjha 8y ago
I don't think memset is required to zero out any padding, because the effects of this are not observable.
- MichaelMoser123 8y agoThe function memset gets the length of the area to overwrite, how is it to know where the padding is?
- saagarjha 8y agoThe compiler knows the layout of your structure and can choose to elide memset calls or replace them with equivalent code.