Lines Matching defs:heap
33 mmDumpMemInfo(const struct mem_block *heap)
35 fprintf(stderr, "Memory heap %p:\n", (void *)heap);
36 if (heap == 0) {
37 fprintf(stderr, " heap == 0\n");
41 for(p = heap->next; p != heap; p = p->next) {
49 for(p = heap->next_free; p != heap; p = p->next_free) {
62 struct mem_block *heap, *block;
67 heap = calloc(1, sizeof(struct mem_block));
68 if (!heap)
73 free(heap);
77 heap->next = block;
78 heap->prev = block;
79 heap->next_free = block;
80 heap->prev_free = block;
82 block->heap = heap;
83 block->next = heap;
84 block->prev = heap;
85 block->next_free = heap;
86 block->prev_free = heap;
92 return heap;
111 newblock->heap = p->heap;
135 newblock->heap = p->heap;
167 mmAllocMem(struct mem_block *heap, unsigned size, unsigned align2, unsigned startSearch)
174 if (!heap || !size)
177 for (p = heap->next_free; p != heap; p = p->next_free) {
189 if (p == heap)
200 mmFindBlock(struct mem_block *heap, unsigned start)
204 for (p = heap->next; p != heap; p = p->next) {
218 /* NOTE: heap->free == 0 */
254 b->next_free = b->heap->next_free;
255 b->prev_free = b->heap;
260 if (b->prev != b->heap)
268 mmDestroy(struct mem_block *heap)
272 if (!heap)
275 for (p = heap->next; p != heap; ) {
281 free(heap);