Lines Matching refs:heap_array
423 static void auxtrace_heapify(struct auxtrace_heap_item *heap_array, in auxtrace_heapify() argument
431 if (heap_array[parent].ordinal <= ordinal) in auxtrace_heapify()
433 heap_array[pos] = heap_array[parent]; in auxtrace_heapify()
436 heap_array[pos].queue_nr = queue_nr; in auxtrace_heapify()
437 heap_array[pos].ordinal = ordinal; in auxtrace_heapify()
443 struct auxtrace_heap_item *heap_array; in auxtrace_heap__add() local
450 heap_array = realloc(heap->heap_array, in auxtrace_heap__add()
452 if (!heap_array) in auxtrace_heap__add()
454 heap->heap_array = heap_array; in auxtrace_heap__add()
458 auxtrace_heapify(heap->heap_array, heap->heap_cnt++, queue_nr, ordinal); in auxtrace_heap__add()
465 zfree(&heap->heap_array); in auxtrace_heap__free()
473 struct auxtrace_heap_item *heap_array; in auxtrace_heap__pop() local
480 heap_array = heap->heap_array; in auxtrace_heap__pop()
491 heap_array[pos] = heap_array[left]; in auxtrace_heap__pop()
494 if (heap_array[left].ordinal < heap_array[right].ordinal) { in auxtrace_heap__pop()
495 heap_array[pos] = heap_array[left]; in auxtrace_heap__pop()
498 heap_array[pos] = heap_array[right]; in auxtrace_heap__pop()
504 auxtrace_heapify(heap_array, pos, heap_array[last].queue_nr, in auxtrace_heap__pop()
505 heap_array[last].ordinal); in auxtrace_heap__pop()