Home | History | Annotate | Download | only in main

Lines Matching full:heap

34 mmDumpMemInfo(const struct mem_block *heap)
36 fprintf(stderr, "Memory heap %p:\n", (void *)heap);
37 if (heap == 0) {
38 fprintf(stderr, " heap == 0\n");
42 for(p = heap->next; p != heap; p = p->next) {
50 for(p = heap->next_free; p != heap; p = p->next_free) {
63 struct mem_block *heap, *block;
68 heap = (struct mem_block *) calloc(1, sizeof(struct mem_block));
69 if (!heap)
74 free(heap);
78 heap->next = block;
79 heap->prev = block;
80 heap->next_free = block;
81 heap->prev_free = block;
83 block->heap = heap;
84 block->next = heap;
85 block->prev = heap;
86 block->next_free = heap;
87 block->prev_free = heap;
93 return heap;
112 newblock->heap = p->heap;
136 newblock->heap = p->heap;
168 mmAllocMem(struct mem_block *heap, unsigned size, unsigned align2, unsigned startSearch)
175 if (!heap || !size)
178 for (p = heap->next_free; p != heap; p = p->next_free) {
190 if (p == heap)
201 mmFindBlock(struct mem_block *heap, unsigned start)
205 for (p = heap->next; p != heap; p = p->next) {
219 /* NOTE: heap->free == 0 */
255 b->next_free = b->heap->next_free;
256 b->prev_free = b->heap;
261 if (b->prev != b->heap)
269 mmDestroy(struct mem_block *heap)
273 if (!heap)
276 for (p = heap->next; p != heap; ) {
282 free(heap);