Lines Matching full:alignment
253 rh_info_t *rh_create(unsigned int alignment) in rh_create() argument
257 /* Alignment must be a power of two */ in rh_create()
258 if ((alignment & (alignment - 1)) != 0) in rh_create()
265 info->alignment = alignment; in rh_create()
300 void rh_init(rh_info_t * info, unsigned int alignment, int max_blocks, in rh_init() argument
306 /* Alignment must be a power of two */ in rh_init()
307 if ((alignment & (alignment - 1)) != 0) in rh_init()
310 info->alignment = alignment; in rh_init()
338 m = info->alignment - 1; in rh_attach_region()
383 m = info->alignment - 1; in rh_detach_region()
438 /* Allocate a block of memory at the specified alignment. The value returned
442 unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const char *owner) in rh_alloc_align() argument
449 /* Validate size, and alignment must be power of two */ in rh_alloc_align()
450 if (size <= 0 || (alignment & (alignment - 1)) != 0) in rh_alloc_align()
453 /* Align to configured alignment */ in rh_alloc_align()
454 size = (size + (info->alignment - 1)) & ~(info->alignment - 1); in rh_alloc_align()
463 start = (blk->start + alignment - 1) & ~(alignment - 1); in rh_alloc_align()
513 /* Allocate a block of memory at the default alignment. The value returned is
519 return rh_alloc_align(info, size, info->alignment, owner); in rh_alloc()
524 * alignment. The value returned is an offset into the buffer initialized by
540 m = info->alignment - 1; in rh_alloc_fixed()