MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1rc9yat/bitfield_layout/o6yi2zk/?context=3
r/cpp • u/mttd • Feb 23 '26
13 comments sorted by
View all comments
Show parent comment
3
Managed compiled languages do exactly that, it is up to the JIT, or AOT with PGO, to decide how it all fits into memory.
If you want a precise layout for FFI or what have you, then explicit layout management comes into play, e.g. StructLayoutAttribute in .NET.
View all comments
Show parent comment
3
u/pjmlp Feb 23 '26 edited Feb 23 '26
Managed compiled languages do exactly that, it is up to the JIT, or AOT with PGO, to decide how it all fits into memory.
If you want a precise layout for FFI or what have you, then explicit layout management comes into play, e.g. StructLayoutAttribute in .NET.