Home | History | Annotate | Download | only in memory

Lines Matching refs:alignment

16 void* AlignedAlloc(size_t size, size_t alignment) {
18 DCHECK_EQ(alignment & (alignment - 1), 0U);
19 DCHECK_EQ(alignment % sizeof(void*), 0U);
22 ptr = _aligned_malloc(size, alignment);
29 ptr = memalign(alignment, size);
31 if (posix_memalign(&ptr, alignment, size))
39 << "size=" << size << ", alignment=" << alignment;
42 // Sanity check alignment just to be safe.
43 DCHECK_EQ(reinterpret_cast<uintptr_t>(ptr) & (alignment - 1), 0U);