| 11 | #include <errno.h> |
| 12 | |
| 13 | int main() { |
| 14 | for (int times = 0; times < 16; ++times) { |
| 15 | for (int alignment = sizeof(void*); alignment <= 64; alignment *= 2) { |
| 16 | assert((uintptr_t)aligned_alloc(alignment, 64) % alignment == 0); |
| 17 | } |
| 18 | } |
| 19 | void *ptr; |
| 20 | ptr = aligned_alloc(3, 64); |
| 21 | assert(ptr == NULL); |
| 22 | assert(posix_memalign(&ptr, 3, 64) == EINVAL); |
| 23 | assert(ptr == NULL); |
| 24 | return 0; |
| 25 | } |
nothing calls this directly
no test coverage detected