diff options
Diffstat (limited to 'macro.h')
-rw-r--r-- | macro.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -39,4 +39,10 @@ #define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif +static inline size_t align(size_t l) { + return (((l + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*)); +} + +#define ALIGN(x) (align(x)) + #endif |