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

Function pqueue_remove

libCacheSim/dataStructure/pqueue.c:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198
199int
200pqueue_remove(pqueue_t *q, void *d)
201{
202 size_t posn = q->getpos(d);
203 q->d[posn] = q->d[--q->size];
204 if (q->cmppri(q->getpri(d), q->getpri(q->d[posn])))
205 bubble_up(q, posn);
206 else
207 percolate_down(q, posn);
208
209 return 0;
210}
211
212
213void *

Callers 2

Size_remove_objFunction · 0.85
Belady_remove_objFunction · 0.85

Calls 2

bubble_upFunction · 0.85
percolate_downFunction · 0.85

Tested by

no test coverage detected