Last active
April 24, 2017 02:57
-
-
Save zerojiu/5673c6c1cbb21408100381b6cfa07fc5 to your computer and use it in GitHub Desktop.
Macro definition of memory operation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Given a size, round up to aligenment sizeof(void*) */ | |
#define MAX_ALIGNMENT 4 | |
#define ROUND_UP_TO_ALIGNMENT_SIZE(x) (((x) + MAX_ALIGNMENT - 1u) & ~(MAX_ALIGNMENT - 1u)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment