Lines Matching refs:size
44 static struct mem_block *split_block(struct mem_block *p, int start, int size,
54 newblock->size = p->size - (start - p->start);
60 p->size -= newblock->size;
65 if (size < p->size) {
70 newblock->start = start + size;
71 newblock->size = p->size - size;
77 p->size = size;
86 static struct mem_block *alloc_block(struct mem_block *heap, int size,
94 if (p->file_priv == NULL && start + size <= p->start + p->size)
95 return split_block(p, start, size, file_priv);
121 p->size += q->size;
129 q->size += p->size;
138 static int init_heap(struct mem_block **heap, int start, int size)
152 blocks->size = size;
182 p->size += q->size;
244 block = alloc_block(*heap, alloc->size, alloc->alignment, file_priv);
304 return init_heap(heap, initheap->start, initheap->size);