Re:Padding is hard
by ori_b on Friday October 09, 2015 @02:29PM
(#10362314)
You don't want to rearrange structs on every system call. That would be slow.
[ Parent
| on HN ]
Re:Padding is hard
by tedunangst on Friday October 09, 2015 @03:05PM
(#10362563)
I think the idea is you would use the "FFI" type throughout the program, perhaps embedded in a larger structure if you need to track additional data.
The same thing is frequently done in C. Wire format data gets padded and __packed as necessary, and then that's usually the program representation as well.