* @brief this function is called by all eviction algorithms to free the cache * * @param cache */
| 74 | * @param cache |
| 75 | */ |
| 76 | void 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 |
no test coverage detected