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

Function Heap_new

src/util/heap.c:163–177  ·  view source on GitHub ↗

create new heap and initialise it

Source from the content-addressed store, hash-verified

161
162// create new heap and initialise it
163heap_t *Heap_new
164(
165 heap_cmp cmp, // cmp callback used to get an item's priority
166 void *udata // udata user data passed through to cmp callback
167) {
168 heap_t *hp = malloc(Heap_sizeof(DEFAULT_CAPACITY));
169
170 if(!hp) {
171 return NULL;
172 }
173
174 Heap_init(hp, cmp, udata, DEFAULT_CAPACITY);
175
176 return hp;
177}
178
179 // initialise heap
180void Heap_init

Callers 11

Cron_StartFunction · 0.85
SlowLog_NewFunction · 0.85
SortInitFunction · 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 2

Heap_sizeofFunction · 0.85
Heap_initFunction · 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