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

Function Heap_init

src/util/heap.c:180–191  ·  view source on GitHub ↗

initialise heap

Source from the content-addressed store, hash-verified

178
179 // initialise heap
180void Heap_init
181(
182 heap_t *hp, // heap to initialise
183 heap_cmp cmp, // cmp Callback used to get an item's priority
184 void *udata, // udata User data passed through to cmp callback
185 unsigned int size // size Initial size of the heap's array
186) {
187 hp->cmp = cmp;
188 hp->size = size;
189 hp->count = 0;
190 hp->udata = udata;
191}
192
193// add item, ensures that the data structure can hold the item
194// NOTE: realloc() possibly called

Callers 1

Heap_newFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected