Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1a1a11a committed Jan 27, 2024
1 parent f3f6ba8 commit 1ce9ea9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions libCacheSim/cache/eviction/RandomTwo.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ static cache_obj_t *RandomTwo_insert(cache_t *cache, const request_t *req) {
static cache_obj_t *RandomTwo_to_evict(cache_t *cache, const request_t *req) {
cache_obj_t *obj_to_evict1 = hashtable_rand_obj(cache->hashtable);
cache_obj_t *obj_to_evict2 = hashtable_rand_obj(cache->hashtable);
DEBUG_ASSERT(obj_to_evict->obj_size != 0);
if (obj_to_evict1->RandomTwo.last_access_vtime <
obj_to_evict2->RandomTwo.last_access_vtime)
return obj_to_evict1;
Expand All @@ -168,7 +167,6 @@ static cache_obj_t *RandomTwo_to_evict(cache_t *cache, const request_t *req) {
static void RandomTwo_evict(cache_t *cache, const request_t *req) {
cache_obj_t *obj_to_evict1 = hashtable_rand_obj(cache->hashtable);
cache_obj_t *obj_to_evict2 = hashtable_rand_obj(cache->hashtable);
DEBUG_ASSERT(obj_to_evict->obj_size != 0);
if (obj_to_evict1->RandomTwo.last_access_vtime <
obj_to_evict2->RandomTwo.last_access_vtime)
cache_evict_base(cache, obj_to_evict1, true);
Expand Down
1 change: 1 addition & 0 deletions libCacheSim/include/libCacheSim/evictionAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ cache_t *flashProb_init(const common_cache_params_t ccache_params,

cache_t *LRU_Prob_init(const common_cache_params_t ccache_params,
const char *cache_specific_params);

cache_t *SFIFOv0_init(const common_cache_params_t ccache_params,
const char *cache_specific_params);

Expand Down

0 comments on commit 1ce9ea9

Please sign in to comment.