Skip to content

Commit

Permalink
fix LIRS find when update_cache is false
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyan committed Nov 22, 2024
1 parent 3a53233 commit 9bdd4dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libCacheSim/cache/eviction/LIRS.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ static cache_obj_t *LIRS_find(cache_t *cache, const request_t *req,
obj_s = params->LRU_s->find(params->LRU_s, req, update_cache);
obj_q = params->LRU_q->find(params->LRU_q, req, update_cache);

if (update_cache == false) {
return obj_s != NULL ? obj_s : obj_q;
}

// cache_obj_t *res = NULL;
if (obj_s != NULL) {
if (obj_s->LIRS.is_LIR) {
Expand Down

0 comments on commit 9bdd4dd

Please sign in to comment.