Created
August 30, 2014 19:06
-
-
Save coruus/1d7528967bfe763aa27f to your computer and use it in GitHub Desktop.
What does it mean?
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
typedef union { | |
int a; | |
short b; | |
char c[1]; | |
long d; | |
#ifdef HAVE_U64_TYPEDEF | |
u64 e; | |
#endif | |
float f; | |
double g; | |
} PROPERLY_ALIGNED_TYPE; | |
typedef struct memblock_struct MEMBLOCK; | |
struct memblock_struct { | |
unsigned size; | |
union { | |
MEMBLOCK *next; | |
PROPERLY_ALIGNED_TYPE aligned; | |
} u; | |
}; | |
MEMBLOCK* mb = (MEMBLOCK*)((char*)p - ((size_t) &((MEMBLOCK*)0)->u.aligned.c)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment