Lines Matching defs:alignment
75 * \param alignment alignment (must be greater than zero).
78 * alignment and to record the real malloc address.
83 _mesa_align_malloc(size_t bytes, unsigned long alignment)
87 int err = posix_memalign(& mem, alignment, bytes);
92 return _aligned_malloc(bytes, alignment);
96 assert( alignment > 0 );
98 ptr = (uintptr_t)malloc(bytes + alignment + sizeof(void *));
102 buf = (ptr + alignment + sizeof(void *)) & ~(uintptr_t)(alignment - 1);
122 _mesa_align_calloc(size_t bytes, unsigned long alignment)
127 mem = _mesa_align_malloc(bytes, alignment);
136 mem = _aligned_malloc(bytes, alignment);
145 assert( alignment > 0 );
147 ptr = (uintptr_t)calloc(1, bytes + alignment + sizeof(void *));
151 buf = (ptr + alignment + sizeof(void *)) & ~(uintptr_t)(alignment - 1);
192 * Reallocate memory, with alignment.
196 unsigned long alignment)
200 return _aligned_realloc(oldBuffer, newSize, alignment);
203 void *newBuf = _mesa_align_malloc(newSize, alignment);