Lines Matching refs:heap_array
460 static void auxtrace_heapify(struct auxtrace_heap_item *heap_array, in auxtrace_heapify() argument
468 if (heap_array[parent].ordinal <= ordinal) in auxtrace_heapify()
470 heap_array[pos] = heap_array[parent]; in auxtrace_heapify()
473 heap_array[pos].queue_nr = queue_nr; in auxtrace_heapify()
474 heap_array[pos].ordinal = ordinal; in auxtrace_heapify()
480 struct auxtrace_heap_item *heap_array; in auxtrace_heap__add() local
487 heap_array = realloc(heap->heap_array, in auxtrace_heap__add()
489 if (!heap_array) in auxtrace_heap__add()
491 heap->heap_array = heap_array; in auxtrace_heap__add()
495 auxtrace_heapify(heap->heap_array, heap->heap_cnt++, queue_nr, ordinal); in auxtrace_heap__add()
502 zfree(&heap->heap_array); in auxtrace_heap__free()
510 struct auxtrace_heap_item *heap_array; in auxtrace_heap__pop() local
517 heap_array = heap->heap_array; in auxtrace_heap__pop()
528 heap_array[pos] = heap_array[left]; in auxtrace_heap__pop()
531 if (heap_array[left].ordinal < heap_array[right].ordinal) { in auxtrace_heap__pop()
532 heap_array[pos] = heap_array[left]; in auxtrace_heap__pop()
535 heap_array[pos] = heap_array[right]; in auxtrace_heap__pop()
541 auxtrace_heapify(heap_array, pos, heap_array[last].queue_nr, in auxtrace_heap__pop()
542 heap_array[last].ordinal); in auxtrace_heap__pop()