| 9 | #define CHECK_ALIGNMENT(ptr, align) EXPECT_EQ((size_t)ptr % align, 0) |
| 10 | |
| 11 | CCL_NAMESPACE_BEGIN |
| 12 | |
| 13 | TEST(util_aligned_malloc, aligned_malloc_16) |
| 14 | { |
| 15 | int *mem = (int *)util_aligned_malloc(sizeof(int), 16); |
| 16 | CHECK_ALIGNMENT(mem, 16); |
| 17 | util_aligned_free(mem, sizeof(int)); |
| 18 | } |
| 19 | |
| 20 | /* On Apple we currently only support 16 bytes alignment. */ |
| 21 | #ifndef __APPLE__ |
nothing calls this directly
no test coverage detected