Lines Matching refs:size
139 blk->size = 0; in get_slot()
157 int size; in attach_free_block() local
162 size = blkn->size; in attach_free_block()
164 e = s + size; in attach_free_block()
176 be = bs + blk->size; in attach_free_block()
193 if (before && s != (before->start + before->size)) in attach_free_block()
215 before->size += size; in attach_free_block()
221 after->start -= size; in attach_free_block()
222 after->size += size; in attach_free_block()
227 before->size += size + after->size; in attach_free_block()
329 int rh_attach_region(rh_info_t * info, unsigned long start, int size) in rh_attach_region() argument
337 e = s + size; in rh_attach_region()
351 size = e - s; in rh_attach_region()
360 blk->size = size; in rh_attach_region()
370 unsigned long rh_detach_region(rh_info_t * info, unsigned long start, int size) in rh_detach_region() argument
377 if (size <= 0) in rh_detach_region()
382 e = s + size; in rh_detach_region()
399 be = blk->start + blk->size; in rh_detach_region()
419 blk->start += size; in rh_detach_region()
420 blk->size -= size; in rh_detach_region()
424 blk->size = s - bs; in rh_detach_region()
429 newblk->size = be - e; in rh_detach_region()
442 unsigned long rh_alloc_align(rh_info_t * info, int size, int alignment, const char *owner) in rh_alloc_align() argument
450 if (size <= 0 || (alignment & (alignment - 1)) != 0) in rh_alloc_align()
454 size = (size + (info->alignment - 1)) & ~(info->alignment - 1); in rh_alloc_align()
462 if (size <= blk->size) { in rh_alloc_align()
464 if (start + size <= blk->start + blk->size) in rh_alloc_align()
474 if (blk->size == size) { in rh_alloc_align()
487 spblk->size = sp_size; in rh_alloc_align()
493 newblk->size = size; in rh_alloc_align()
497 blk->start = start + size; in rh_alloc_align()
498 blk->size -= sp_size + size; in rh_alloc_align()
500 if (blk->size == 0) { in rh_alloc_align()
517 unsigned long rh_alloc(rh_info_t * info, int size, const char *owner) in rh_alloc() argument
519 return rh_alloc_align(info, size, info->alignment, owner); in rh_alloc()
527 unsigned long rh_alloc_fixed(rh_info_t * info, unsigned long start, int size, const char *owner) in rh_alloc_fixed() argument
534 if (size <= 0) in rh_alloc_fixed()
539 e = s + size; in rh_alloc_fixed()
556 be = blk->start + blk->size; in rh_alloc_fixed()
581 blk->start += size; in rh_alloc_fixed()
582 blk->size -= size; in rh_alloc_fixed()
586 blk->size = s - bs; in rh_alloc_fixed()
591 newblk2->size = be - e; in rh_alloc_fixed()
598 newblk1->size = e - s; in rh_alloc_fixed()
616 int size; in rh_free() local
627 if (blk == NULL || start > (blk->start + blk->size)) in rh_free()
634 size = blk->size; in rh_free()
637 return size; in rh_free()
668 stats->size = blk->size; in rh_get_stats()
683 int size; in rh_set_owner() local
694 if (blk == NULL || start > (blk->start + blk->size)) in rh_set_owner()
698 size = blk->size; in rh_set_owner()
700 return size; in rh_set_owner()
723 st[i].start, st[i].start + st[i].size, in rh_dump()
724 st[i].size); in rh_dump()
734 st[i].start, st[i].start + st[i].size, in rh_dump()
735 st[i].size, st[i].owner != NULL ? st[i].owner : ""); in rh_dump()
744 blk, blk->start, blk->start + blk->size, blk->size); in rh_dump_blk()