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

Function cache_struct_free

libCacheSim/cache/cache.c:76–81  ·  view source on GitHub ↗

* @brief this function is called by all eviction algorithms to free the cache * * @param cache */

Source from the content-addressed store, hash-verified

74 * @param cache
75 */
76void cache_struct_free(cache_t *cache) {
77 free_hashtable(cache->hashtable);
78 if (cache->admissioner != NULL) cache->admissioner->free(cache->admissioner);
79 if (cache->prefetcher != NULL) cache->prefetcher->free(cache->prefetcher);
80 my_free(sizeof(cache_t), cache);
81}
82
83/**
84 * @brief create a new cache with the same size as the old cache

Callers 15

ARCv0_freeFunction · 0.85
LeCaRv0_freeFunction · 0.85
LRU_Prob_freeFunction · 0.85
nop_freeFunction · 0.85
Clock_freeFunction · 0.85
FIFO_freeFunction · 0.85
S3FIFO_freeFunction · 0.85
LRUv0_freeFunction · 0.85
S3FIFOd_freeFunction · 0.85
RandomLRU_freeFunction · 0.85
QDLP_freeFunction · 0.85
LIRS_freeFunction · 0.85

Calls 1

freeMethod · 0.45

Tested by

no test coverage detected