//宏定义,字节对齐算法
//@x-表示字节数
//@a-表示多少个字节对齐
#define ALIGN(x, a) (((x) + ((a) - 1)) & ~((a) - 1))

范例:

int size = ALIGN(101, 4);

size=104

int size = ALIGN(100, 4);

size=100