MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / Heap_peek

Function Heap_peek

src/util/heap.c:249–258  ·  view source on GitHub ↗

return top item of the heap

Source from the content-addressed store, hash-verified

247
248// return top item of the heap
249void *Heap_peek
250(
251 const heap_t *hp
252) {
253 if(0 == Heap_count(hp)) {
254 return NULL;
255 }
256
257 return hp->array[0];
258}
259
260// clear all items
261// note: does not free items

Callers 11

CRON_PeekFunction · 0.85
SlowLog_AddFunction · 0.85
_accumulateFunction · 0.85
SPpaths_k_minimalFunction · 0.85
SSpaths_k_minimalFunction · 0.85
test_heapCreateFunction · 0.85
test_heapPopulateFunction · 0.85
test_heapPopulateDupFunction · 0.85
test_heapPopulateRandFunction · 0.85
test_heapRemoveElementFunction · 0.85
test_heapFuzzFunction · 0.85

Calls 1

Heap_countFunction · 0.85

Tested by 6

test_heapCreateFunction · 0.68
test_heapPopulateFunction · 0.68
test_heapPopulateDupFunction · 0.68
test_heapPopulateRandFunction · 0.68
test_heapRemoveElementFunction · 0.68
test_heapFuzzFunction · 0.68