Skip to content

Are there any alignment guarantees for .data declarations? #69044

Answered by jkotas
lorcanmooney asked this question in Q&A
Discussion options

You must be logged in to vote

Does the runtime provide any useful guarantees I can work with?

There is no useful guarantee today. (Nit: The alignment has to be guaranteed by the compiler. Runtime cannot do much about it.)

Dealing with the alignment guarantees has been a significant part of the work required to make #60948 and associated Roslyn feature happen. Look at the linked issue to see all places that had to be fixed to make the alignment work.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@lorcanmooney
Comment options

@lorcanmooney
Comment options

Answer selected by lorcanmooney
Comment options

You must be logged in to vote
1 reply
@jkotas
Comment options

jkotas Jun 24, 2025
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants