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

Function Size_remove_obj

libCacheSim/cache/eviction/Size.c:214–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214static void Size_remove_obj(cache_t *cache, cache_obj_t *obj) {
215 Size_params_t *params = cache->eviction_params;
216 DEBUG_ASSERT(obj != NULL);
217
218 if (obj->Size.pq_node != NULL) {
219 /* if it is NULL, it means we have deleted the entry in pq before this */
220 pqueue_remove(params->pq, obj->Size.pq_node);
221 my_free(sizeof(pq_node_t), obj->Size.pq_node);
222 obj->Size.pq_node = NULL;
223 }
224
225 cache_remove_obj_base(cache, obj, true);
226}
227
228/**
229 * @brief remove an object from the cache

Callers 1

Size_removeFunction · 0.85

Calls 2

pqueue_removeFunction · 0.85
cache_remove_obj_baseFunction · 0.85

Tested by

no test coverage detected