Lines Matching refs:heap
74 /* Bucket heap / gen */
184 ca->heap.used = 0;
190 if (!heap_full(&ca->heap))
191 heap_add(&ca->heap, b, bucket_max_cmp);
192 else if (bucket_max_cmp(b, heap_peek(&ca->heap))) {
193 ca->heap.data[0] = b;
194 heap_sift(&ca->heap, 0, bucket_max_cmp);
198 for (i = ca->heap.used / 2 - 1; i >= 0; --i)
199 heap_sift(&ca->heap, i, bucket_min_cmp);
202 if (!heap_pop(&ca->heap, b, bucket_min_cmp)) {