Lines Matching refs:heap_node
64 struct heap_node { struct
69 static const heap_node *list_end = (heap_node *) ( &heap [ HEAP_SIZE ] ); // one past the end of …
70 static heap_node *freelist = NULL;
72 heap_node *node_from_offset ( const heap_offset offset ) in node_from_offset()
73 { return (heap_node *) ( heap + ( offset * sizeof (heap_node))); } in node_from_offset()
75 heap_offset offset_from_node ( const heap_node *ptr ) in offset_from_node()
76 …p_offset>(static_cast<size_t>(reinterpret_cast<const char *>(ptr) - heap) / sizeof (heap_node)); } in offset_from_node()
79 freelist = (heap_node *) heap; in init_heap()
81 freelist->len = HEAP_SIZE / sizeof (heap_node); in init_heap()
86 { return (len + sizeof(heap_node) - 1) / sizeof(heap_node) + 1; } in alloc_size()
92 heap_node *p, *prev; in fallback_malloc()
104 heap_node *q; in fallback_malloc()
126 heap_node *after ( struct heap_node *p ) { return p + p->len; } in after()
129 struct heap_node *cp = ((struct heap_node *) ptr) - 1; // retrieve the chunk in fallback_free()
130 struct heap_node *p, *prev; in fallback_free()
178 struct heap_node *p, *prev; in print_free_list()