Lines Matching refs:alignment
77 memalign(size_t alignment, size_t n);
98 (i.e., 8 byte alignment with 4byte size_t). This suffices for
137 appear as negative after accounting for overhead and alignment
325 /* With rounding and alignment, the bins are...
343 lists' chunks, and also perform allocation alignment checks on them.
666 memalign(size_t alignment, size_t n);
668 in accord with the alignment argument.
670 The alignment argument should be a power of two. If the argument is
672 8-byte alignment is guaranteed by normal malloc calls, so don't
755 often not) due to alignment and minimum size constraints.
775 because of alignment and bookkeeping overhead. Because it includes
776 alignment wastage as being in use, this figure may be greater than
790 posix_memalign(void **memptr, size_t alignment, size_t size);
843 chunksize units, which adds padding and alignment. You can reduce
972 maximum heap size and its alignment. Going above 512k (i.e., 1M
1008 2. It can lead to more wastage because of mmap page alignment
1275 ---------- Size and alignment checks and conversions ----------
1284 for alignment check) so the tags are not relevant, and there are
1320 /* Check if m has acceptable alignment */
2218 /* ... and alignment */
2275 /* alignment is a power of 2 */
2430 further alignments unless we have have high alignment.
2455 meet alignment requirements here and in memalign(), and still be able to
2702 this is not first time through, this preserves page-alignment of
2812 /* Guarantee alignment of first new chunk made from this space */
3519 __libc_memalign (size_t alignment, size_t bytes)
3525 return _mid_memalign (alignment, bytes, address);
3529 _mid_memalign (size_t alignment, size_t bytes, void *address)
3534 /* If we need less alignment than we give anyway, just relay to malloc. */
3535 if (alignment <= MALLOC_ALIGNMENT)
3539 if (alignment < MINSIZE)
3540 alignment = MINSIZE;
3542 /* If the alignment is greater than SIZE_MAX / 2 + 1 it cannot be a
3544 if (alignment > SIZE_MAX / 2 + 1)
3551 /* Make sure alignment is power of 2. */
3552 if (!powerof2 (alignment))
3555 while (a < alignment)
3557 alignment = a;
3562 p = _int_memalign (&main_arena, alignment, bytes);
3568 arena_get (ar_ptr, bytes + alignment + MINSIZE);
3570 p = _int_memalign (ar_ptr, alignment, bytes);
3573 LIBC_PROBE (memory_memalign_retry, 2, bytes, alignment);
3575 p = _int_memalign (ar_ptr, alignment, bytes);
3796 overhead plus possibly more to obtain necessary alignment and/or
4940 _int_memalign (mstate av, size_t alignment, size_t bytes)
4945 char *brk; /* alignment point within p */
4948 INTERNAL_SIZE_T leadsize; /* leading space before alignment point */
4962 Strategy: find a spot within that chunk that meets the alignment
4966 /* Call malloc with worst case padding to hit alignment. */
4968 m = (char *) (_int_malloc (av, nb + alignment + MINSIZE));
4975 if ((((unsigned long) (m)) % alignment) != 0) /* misaligned */
4984 brk = (char *) mem2chunk (((unsigned long) (m + alignment - 1)) &
4985 - ((signed long) alignment));
4987 brk += alignment;
5010 (((unsigned long) (chunk2mem (p))) % alignment) == 0);
5674 __posix_memalign (void **memptr, size_t alignment, size_t size)
5683 if (alignment % sizeof (void *) != 0
5684 || !powerof2 (alignment / sizeof (void *))
5685 || alignment == 0)
5690 mem = _mid_memalign (alignment, size, address);