Fix padding size comment in struct S3 - #5963
Sniff (darkclif) wants to merge 1 commit into
Conversation
Updated the comment to reflect the correct padding size for struct S3.
|
Sniff (@darkclif) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Sniff (@darkclif) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit a4cd024: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
Tyler Whitney (TylerMSFT)
left a comment
There was a problem hiding this comment.
Thank you for catching this.
|
Actually, I think I just made the same mistake you may have made.
Those 16 padding bytes are part of Layout of
bytes 0-31: S3::s1 (the complete 32-byte The next size that is a multiple of 32 is 64 bytes. So, S3 trailing padding = 64 - 36 = 28 bytes The compiler rounds an object's size to a multiple of its alignment so that if it declared as an array, every element will be correctly aligned. For example, because
Here's a little test app you can try: Closing this PR since the original value (28) is correct. |
Updated the comment to reflect the correct padding size for struct S3.