Home | History | Annotate | Download | only in scudo

Lines Matching refs:Alignment

61 // as of now), which fits nicely with the alignment requirements.
317 void *allocate(uptr Size, uptr Alignment, AllocType Type) {
320 if (!IsPowerOfTwo(Alignment)) {
321 dieWithMessage("ERROR: malloc alignment is not a power of 2\n");
323 if (Alignment > MaxAlignment)
325 if (Alignment < MinAlignment)
326 Alignment = MinAlignment;
333 if (Alignment > MinAlignment)
334 ExtraBytes += Alignment;
356 if (!IsAligned(ChunkBeg, Alignment))
357 ChunkBeg = RoundUpTo(ChunkBeg, Alignment);
568 void *scudoMemalign(uptr Alignment, uptr Size) {
569 return Instance.allocate(Size, Alignment, FromMemalign);
582 int scudoPosixMemalign(void **MemPtr, uptr Alignment, uptr Size) {
583 *MemPtr = Instance.allocate(Size, Alignment, FromMemalign);
587 void *scudoAlignedAlloc(uptr Alignment, uptr Size) {
588 // size must be a multiple of the alignment. To avoid a division, we first
589 // make sure that alignment is a power of 2.
590 CHECK(IsPowerOfTwo(Alignment));
591 CHECK_EQ((Size & (Alignment - 1)), 0);
592 return Instance.allocate(Size, Alignment, FromMalloc);