地址向上对齐算法
#define align(size, align) ((size + align - 1) & ~(align - 1))
地址向下对齐算法
#define align_down(size, align) (size & ~(align - 1))
举例:
align(9, 4) = (9 + 4 - 1) & ~(4 - 1) = (1101)B & (1100)B = (1100)B = 12
align_down(9, 4) = 9 & ~(4 - 1) = (1001)B & (1100)B = (1000)B = 8