Lines Matching refs:alignment
40 // Checks aligned_alloc() parameters, verifies that the alignment is a power of
41 // two and that the size is a multiple of alignment for POSIX implementation,
43 // of alignment.
44 inline bool CheckAlignedAllocAlignmentAndSize(uptr alignment, uptr size) {
46 return alignment != 0 && IsPowerOfTwo(alignment) &&
47 (size & (alignment - 1)) == 0;
49 return alignment != 0 && size % alignment == 0;
53 // Checks posix_memalign() parameters, verifies that alignment is a power of two
55 inline bool CheckPosixMemalignAlignment(uptr alignment) {
56 return alignment != 0 && IsPowerOfTwo(alignment) &&
57 (alignment % sizeof(void *)) == 0;