@Joshua: the pointer itself has zeroes in its 4 least significant bits, because it points to a 16 byte aligned address. Now you can stuff things (like count/length/size) into the pointer itself, and dereference through "*(((uintptr_t)p)&~((uintptr_t)15))". See en.wikipedia.org/.../Tagged_pointer
↧
re: If you're going to write your own allocator, you need to respect the MEMORY_ALLOCATION_ALIGNMENT
↧