/** * @def RT_ALIGN(size, align) * Return the most contiguous size aligned at specified width. RT_ALIGN(13, 4) would return 16. */ #define RT_ALIGN(size, align) (((size) + (align) - 1) & ~((align) - 1))
/** * @def RT_ALIGN_DOWN(size, align) * Return the down number of aligned at specified width. RT_ALIGN_DOWN(13, 4) would return 12. */ #define RT_ALIGN_DOWN(size, align) ((size) & ~((align) - 1))