#include #include size_t memalignment(const void *p) { uintptr_t bits = (uintptr_t)p; return (bits^(bits-1))&bits; }