#include #include #include #include int main (void) { void *p; for (ptrdiff_t i = 4096; (intptr_t) (p = malloc (i)) & 4095; i++) printf ("allocation of %td bytes yielded unaligned pointer %p\n", i, p); if (!p) printf ("allocation failed\n"); return 0; }