Repository navigation
tcn_ssl_ctxt_t alignment to avoid padding - #225
Closed
Scottmitch wants to merge 1 commit into
Closed
Scottmitch wants to merge 1 commit into
Scottmitch wants to merge 1 commit into
Conversation
Motivation: tcn_ssl_ctxt_t is not properly aligned which may result in increased memory or additional padding inserted. Relying on the compiler optimization can be fragile and lead to inconsistencies between compilers. Modifications: - Align internals of tcn_ssl_ctxt_t to be grouped in 64 byte chunks. Result: More proper memory alignment of the tcn_ssl_ctxt_t structure.
Closed
Scottmitch
force-pushed
the
tcn_struct_padding
branch
from
February 3, 2017 06:18
3a076f8 to
c4d5ff5
Compare
Member
|
@Scottmitch LGTM... that said I wonder if you want to add some comments about the size of the different fields and so make it easier to understand and so do the right thing when a new one is added |
Member
Author
|
I think this is just a general consideration when modifying c structures. IMO it would be overkill to comment on every c structure about how alignment was done. When the fields are added/removed we should consider alignment/padding. |
Member
Author
|
master (6756ffd) |
Member
|
@Scottmitch ok fair enough... I also set the milestone, please do next time ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
tcn_ssl_ctxt_t is not properly aligned which may result in increased memory or additional padding inserted. Relying on the compiler optimization can be fragile and lead to inconsistencies between compilers.
Modifications:
Result:
More proper memory alignment of the tcn_ssl_ctxt_t structure.