Lines Matching refs:align
229 for (size_t align = 0; align < sizeof(long); align++) { in TEST() local
230 ASSERT_EQ(EINVAL, posix_memalign(&ptr, align, 256)) in TEST()
231 << "Unexpected value at align " << align; in TEST()
237 for (size_t align = sizeof(long); align <= 2048; align <<= 1) { in TEST() local
239 for (size_t fail_align = last_align + 1; fail_align < align; fail_align++) { in TEST()
243 ASSERT_EQ(0, posix_memalign(&ptr, align, 256)) in TEST()
244 << "Unexpected failure at align " << align; in TEST()
245 ASSERT_EQ(0U, reinterpret_cast<uintptr_t>(ptr) & (align - 1)) in TEST()
246 << "Did not return a valid aligned ptr " << ptr << " expected alignment " << align; in TEST()
248 last_align = align; in TEST()
275 for (size_t align = 1; align <= 2048; align <<= 1) { in TEST() local
277 for (size_t fail_align = last_align + 1; fail_align < align; fail_align++) { in TEST()
282 void* ptr = aligned_alloc(align, 2 * align); in TEST()
283 ASSERT_TRUE(ptr != nullptr) << "Unexpected failure at align " << align; in TEST()
284 ASSERT_EQ(0U, reinterpret_cast<uintptr_t>(ptr) & (align - 1)) in TEST()
285 << "Did not return a valid aligned ptr " << ptr << " expected alignment " << align; in TEST()
287 last_align = align; in TEST()