Lines Matching refs:Alignment

303   allocate(uptr Size, uptr Alignment, AllocType Type,  in allocate()
307 if (UNLIKELY(Alignment > MaxAlignment)) { in allocate()
310 reportAllocationAlignmentTooBig(Alignment, MaxAlignment); in allocate()
312 if (UNLIKELY(Alignment < MinAlignment)) in allocate()
313 Alignment = MinAlignment; in allocate()
317 if (void *Ptr = GuardedAlloc.allocate(Size, Alignment)) { in allocate()
327 const uptr AlignedSize = (Alignment > MinAlignment) ? in allocate()
328 NeededSize + (Alignment - Chunk::getHeaderSize()) : NeededSize; in allocate()
359 BackendPtr = Backend.allocateSecondary(BackendSize, Alignment); in allocate()
374 if (UNLIKELY(!IsAligned(UserPtr, Alignment))) { in allocate()
379 const uptr AlignedUserPtr = RoundUpTo(UserPtr, Alignment); in allocate()
702 void *scudoAllocate(uptr Size, uptr Alignment, AllocType Type) { in scudoAllocate() argument
703 if (Alignment && UNLIKELY(!IsPowerOfTwo(Alignment))) { in scudoAllocate()
707 reportAllocationAlignmentNotPowerOfTwo(Alignment); in scudoAllocate()
709 return SetErrnoOnNull(Instance.allocate(Size, Alignment, Type)); in scudoAllocate()
712 void scudoDeallocate(void *Ptr, uptr Size, uptr Alignment, AllocType Type) { in scudoDeallocate() argument
713 Instance.deallocate(Ptr, Size, Alignment, Type); in scudoDeallocate()
748 int scudoPosixMemalign(void **MemPtr, uptr Alignment, uptr Size) { in scudoPosixMemalign() argument
749 if (UNLIKELY(!CheckPosixMemalignAlignment(Alignment))) { in scudoPosixMemalign()
751 reportInvalidPosixMemalignAlignment(Alignment); in scudoPosixMemalign()
754 void *Ptr = Instance.allocate(Size, Alignment, FromMemalign); in scudoPosixMemalign()
761 void *scudoAlignedAlloc(uptr Alignment, uptr Size) { in scudoAlignedAlloc() argument
762 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(Alignment, Size))) { in scudoAlignedAlloc()
766 reportInvalidAlignedAllocAlignment(Size, Alignment); in scudoAlignedAlloc()
768 return SetErrnoOnNull(Instance.allocate(Size, Alignment, FromMalloc)); in scudoAlignedAlloc()