HACKER
TALK
Home
Channels
beta
Bookmarks
Messages
Notifications
Sign In
Comment
结构体字节对齐问题
这里union联合体占用24字节我懂,那么4248=36字节,占用40字节是为了和8对齐,我不懂为啥要和8对齐,直接36字节不行吗
梦回故里
·
2 years ago
需要按照int,double对齐,按照int对齐,可以是36,但是满足double对齐的话就是40,因为5*8=40
Reply
Report
梦回故里
Joined 2 years ago
Follow
Message