Lines Matching refs:size
43 static struct mem_block *split_block(struct mem_block *p, int start, int size,
53 newblock->size = p->size - (start - p->start);
59 p->size -= newblock->size;
64 if (size < p->size) {
69 newblock->start = start + size;
70 newblock->size = p->size - size;
76 p->size = size;
85 static struct mem_block *alloc_block(struct mem_block *heap, int size,
93 if (p->file_priv == NULL && start + size <= p->start + p->size)
94 return split_block(p, start, size, file_priv);
120 p->size += q->size;
128 q->size += p->size;
137 static int init_heap(struct mem_block **heap, int start, int size)
152 blocks->size = size;
181 p->size += q->size;
243 block = alloc_block(*heap, alloc->size, alloc->alignment, file_priv);
303 return init_heap(heap, initheap->start, initheap->size);