Lines Matching refs:mem_block
31 void mmDumpMemInfo(const struct mem_block *heap) in mmDumpMemInfo()
37 const struct mem_block *p; in mmDumpMemInfo()
57 struct mem_block *mmInit(int ofs, int size) in mmInit()
59 struct mem_block *heap, *block; in mmInit()
64 heap = (struct mem_block *)calloc(1, sizeof(struct mem_block)); in mmInit()
68 block = (struct mem_block *)calloc(1, sizeof(struct mem_block)); in mmInit()
92 static struct mem_block *SliceBlock(struct mem_block *p, in SliceBlock()
96 struct mem_block *newblock; in SliceBlock()
101 (struct mem_block *)calloc(1, sizeof(struct mem_block)); in SliceBlock()
126 (struct mem_block *)calloc(1, sizeof(struct mem_block)); in SliceBlock()
162 struct mem_block *mmAllocMem(struct mem_block *heap, int size, int align2, in mmAllocMem()
165 struct mem_block *p; in mmAllocMem()
194 struct mem_block *mmFindBlock(struct mem_block *heap, int start) in mmFindBlock()
196 struct mem_block *p; in mmFindBlock()
206 static int Join2Blocks(struct mem_block *p) in Join2Blocks()
213 struct mem_block *q = p->next; in Join2Blocks()
230 int mmFreeMem(struct mem_block *b) in mmFreeMem()
257 void mmDestroy(struct mem_block *heap) in mmDestroy()
259 struct mem_block *p; in mmDestroy()
265 struct mem_block *next = p->next; in mmDestroy()