如何结构保存在内存中Ç [英] How structs are saved in memory C
本文介绍了如何结构保存在内存中Ç的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在如何C结构都保存在内存中?
How structs in C are saved in the memory?
为什么有时候在存储器中的结构体的长度是大
高于预期?
Why sometimes the struct length in the memory is bigger than expected?
推荐答案
这就是所谓的数据结构调整。
虽然不是一个完美的副本,你可以在结构填充找到一个很好的解释,用C和结构包装
Although not a perfect duplicate, you can find a good explanation of this in C at structure padding and structure packing
这篇关于如何结构保存在内存中Ç的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文