Lines Matching refs:heap
413 int auxtrace_heap__add(struct auxtrace_heap *heap, unsigned int queue_nr, in auxtrace_heap__add() argument
418 if (queue_nr >= heap->heap_sz) { in auxtrace_heap__add()
423 heap_array = realloc(heap->heap_array, in auxtrace_heap__add()
427 heap->heap_array = heap_array; in auxtrace_heap__add()
428 heap->heap_sz = heap_sz; in auxtrace_heap__add()
431 auxtrace_heapify(heap->heap_array, heap->heap_cnt++, queue_nr, ordinal); in auxtrace_heap__add()
436 void auxtrace_heap__free(struct auxtrace_heap *heap) in auxtrace_heap__free() argument
438 zfree(&heap->heap_array); in auxtrace_heap__free()
439 heap->heap_cnt = 0; in auxtrace_heap__free()
440 heap->heap_sz = 0; in auxtrace_heap__free()
443 void auxtrace_heap__pop(struct auxtrace_heap *heap) in auxtrace_heap__pop() argument
445 unsigned int pos, last, heap_cnt = heap->heap_cnt; in auxtrace_heap__pop()
451 heap->heap_cnt -= 1; in auxtrace_heap__pop()
453 heap_array = heap->heap_array; in auxtrace_heap__pop()