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

Function nop_init

libCacheSim/cache/eviction/nop.c:47–66  ·  view source on GitHub ↗

end user facing functions init, free, get * @brief initialize a nop cache * * @param ccache_params some common cache parameters * @param cache_specific_params nop specific parameters, should be NULL */

Source from the content-addressed store, hash-verified

45 * @param cache_specific_params nop specific parameters, should be NULL
46 */
47cache_t *nop_init(const common_cache_params_t ccache_params,
48 const char *cache_specific_params) {
49 cache_t *cache =
50 cache_struct_init("nop", ccache_params, cache_specific_params);
51 cache->cache_init = nop_init;
52 cache->cache_free = nop_free;
53 cache->get = nop_get;
54 cache->find = nop_find;
55 cache->insert = nop_insert;
56 cache->evict = nop_evict;
57 cache->remove = nop_remove;
58 cache->to_evict = nop_to_evict;
59 cache->get_occupied_byte = cache_get_occupied_byte_default;
60 cache->can_insert = cache_can_insert_default;
61 cache->get_n_obj = cache_get_n_obj_default;
62
63 cache->obj_md_size = 0;
64
65 return cache;
66}
67
68/**
69 * free resources used by this cache

Callers 1

create_cacheFunction · 0.85

Calls 1

cache_struct_initFunction · 0.85

Tested by

no test coverage detected