14 #pragma mark - Definitions - 21 #define align_up(num, align) (((num) + ((align)-1)) & ~((align)-1)) 28 #define PTR_OFFSET_SZ sizeof(offset_t) 41 assert((align & (align - 1)) == 0);
50 void* p =
malloc(size + hdr_size);
87 void* p = (
void*)((uint8_t*)ptr - offset);
void * aligned_malloc(size_t align, size_t size)
Allocated aligned memory.
void aligned_free(void *ptr)
Free aligned memory.
void * malloc(size_t __attribute__((unused)) size)
uint16_t offset_t
Number of bytes we're using for storing the aligned pointer offset.
#define PTR_OFFSET_SZ
Macro for accessing the size of our current pointer offset.
void free(void *__attribute__((unused)) ptr)
#define align_up(num, align)