4 #include "../../config.h"
8 #if defined(HAVE_ALIGNED_ALLOC)
12 p
= aligned_alloc(0, 8);
13 assert(p
== NULL
&& errno
== EINVAL
);
15 // non multiple of alignment passes on Solaris
16 p
= aligned_alloc(8, 25);
17 assert(p
&& ((size_t)p
% 8U == 0U));
20 // align not power of 2
21 p
= aligned_alloc(40, 160);
26 if (sizeof(size_t) == 8)
28 p
= aligned_alloc(16, 1UL<<48);
36 assert(p
== NULL
&& errno
== ENOMEM
);