#define ALIGNUP(VALUE, c) ((VALUE + c - 1) & ~(c - 1)) #define ALIGNDOWN(VALUE, c) ((VALUE / c) * c) #define ALIGNPAGEUP(VALUE) ALIGNUP(VALUE, 4096) #define ALIGNPAGEDOWN(VALUE) ALIGNDOWN(VALUE, 4096)