MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / pqueue_pop

Function pqueue_pop

libCacheSim/dataStructure/pqueue.c:213–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211
212
213void *
214pqueue_pop(pqueue_t *q)
215{
216 void *head;
217
218 if (!q || q->size == 1)
219 return NULL;
220
221 head = q->d[1];
222 q->d[1] = q->d[--q->size];
223 percolate_down(q, 1);
224
225 return head;
226}
227
228
229void *

Callers 6

Size_freeFunction · 0.85
Size_evictFunction · 0.85
Belady_freeFunction · 0.85
Belady_evictFunction · 0.85
_PG_get_prefetch_listFunction · 0.85
pqueue_printFunction · 0.85

Calls 1

percolate_downFunction · 0.85

Tested by

no test coverage detected