Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libCacheSim/cache/eviction/S3FIFO.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ static cache_obj_t *S3FIFO_insert(cache_t *cache, const request_t *req) {
obj = main_fifo->insert(main_fifo, req);
} else {
/* insert into small fifo */
// NOTE: Inserting an object whose size equals the size of small fifo is
// NOT allowed. Doing so would completely fill the small fifo, causing all
// objects in small fifo to be evicted. This scenario may occur
// when using a tiny cache size.
if (req->obj_size >= small_fifo->cache_size) {
return NULL;
}
Expand Down
Loading