Lines Matching refs:Alignment
292 void *allocate(uptr Size, uptr Alignment, AllocType Type, in allocate()
295 if (UNLIKELY(Alignment > MaxAlignment)) { in allocate()
298 reportAllocationAlignmentTooBig(Alignment, MaxAlignment); in allocate()
300 if (UNLIKELY(Alignment < MinAlignment)) in allocate()
301 Alignment = MinAlignment; in allocate()
305 const uptr AlignedSize = (Alignment > MinAlignment) ? in allocate()
306 NeededSize + (Alignment - Chunk::getHeaderSize()) : NeededSize; in allocate()
337 BackendPtr = Backend.allocateSecondary(BackendSize, Alignment); in allocate()
352 if (UNLIKELY(!IsAligned(UserPtr, Alignment))) { in allocate()
357 const uptr AlignedUserPtr = RoundUpTo(UserPtr, Alignment); in allocate()
641 void *scudoAllocate(uptr Size, uptr Alignment, AllocType Type) { in scudoAllocate() argument
642 if (Alignment && UNLIKELY(!IsPowerOfTwo(Alignment))) { in scudoAllocate()
646 reportAllocationAlignmentNotPowerOfTwo(Alignment); in scudoAllocate()
648 return SetErrnoOnNull(Instance.allocate(Size, Alignment, Type)); in scudoAllocate()
651 void scudoDeallocate(void *Ptr, uptr Size, uptr Alignment, AllocType Type) { in scudoDeallocate() argument
652 Instance.deallocate(Ptr, Size, Alignment, Type); in scudoDeallocate()
687 int scudoPosixMemalign(void **MemPtr, uptr Alignment, uptr Size) { in scudoPosixMemalign() argument
688 if (UNLIKELY(!CheckPosixMemalignAlignment(Alignment))) { in scudoPosixMemalign()
690 reportInvalidPosixMemalignAlignment(Alignment); in scudoPosixMemalign()
693 void *Ptr = Instance.allocate(Size, Alignment, FromMemalign); in scudoPosixMemalign()
700 void *scudoAlignedAlloc(uptr Alignment, uptr Size) { in scudoAlignedAlloc() argument
701 if (UNLIKELY(!CheckAlignedAllocAlignmentAndSize(Alignment, Size))) { in scudoAlignedAlloc()
705 reportInvalidAlignedAllocAlignment(Size, Alignment); in scudoAlignedAlloc()
707 return SetErrnoOnNull(Instance.allocate(Size, Alignment, FromMalloc)); in scudoAlignedAlloc()