Lines Matching refs:alignment

1361 DLMALLOC_EXPORT void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
4910 static void* internal_memalign(mstate m, size_t alignment, size_t bytes) { in internal_memalign() argument
4912 if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */ in internal_memalign()
4913 alignment = MIN_CHUNK_SIZE; in internal_memalign()
4914 if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */ in internal_memalign()
4916 while (a < alignment) a <<= 1; in internal_memalign()
4917 alignment = a; in internal_memalign()
4919 if (bytes >= MAX_REQUEST - alignment) { in internal_memalign()
4926 size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD; in internal_memalign()
4936 if ((((size_t)(mem)) & (alignment - 1)) != 0) { /* misaligned */ in internal_memalign()
4945 char* br = (char*)mem2chunk((size_t)(((size_t)((char*)mem + alignment - in internal_memalign()
4947 -alignment)); in internal_memalign()
4949 br : br+alignment; in internal_memalign()
4980 assert(((size_t)mem & (alignment - 1)) == 0); in internal_memalign()
5296 void* dlmemalign(size_t alignment, size_t bytes) { in dlmemalign() argument
5297 if (alignment <= MALLOC_ALIGNMENT) { in dlmemalign()
5300 return internal_memalign(gm, alignment, bytes); in dlmemalign()
5303 int dlposix_memalign(void** pp, size_t alignment, size_t bytes) { in dlposix_memalign() argument
5305 if (alignment == MALLOC_ALIGNMENT) in dlposix_memalign()
5308 size_t d = alignment / sizeof(void*); in dlposix_memalign()
5309 size_t r = alignment % sizeof(void*); in dlposix_memalign()
5312 else if (bytes <= MAX_REQUEST - alignment) { in dlposix_memalign()
5313 if (alignment < MIN_CHUNK_SIZE) in dlposix_memalign()
5314 alignment = MIN_CHUNK_SIZE; in dlposix_memalign()
5315 mem = internal_memalign(gm, alignment, bytes); in dlposix_memalign()
5847 void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) { in mspace_memalign() argument
5853 if (alignment <= MALLOC_ALIGNMENT) in mspace_memalign()
5855 return internal_memalign(ms, alignment, bytes); in mspace_memalign()