PowerPC Embedded Application Binary Interface (EABI)初探

C的源代码中定义一下结构体。

typedef struct {
UINT8 RecType;
UINT8 NumBytes;
UINT32 LoadAddr;
UINT8 Data[MaxSRecLen];

} SRecDataRec;

发现,在内存中是按照以下方式排列的:

可见,struct中间可能是留有空隙的。这样的对齐方式是符合标准的。

原文地址:https://www.cnblogs.com/praiseslow/p/9383294.html