#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
Macro to compute the size of the static array arr .
arr
static array
#define ALIGN(v, a) (((v) + (a)-1) & ~((a)-1))
Macro to align a value v to a specified unit a .
v
a
value to be aligned
alignment unit in bytes
#define ALIGN_DOWN(x, a) ALIGN((x) - ((a) - 1), (a))
Macro to align down a value v to a specified unit a .
value to be aligned down