Skip to content

Commit da022c2

Browse files
authored
feat: add Clock2QPlus eviction algorithm (#314)
* feat: add Clock2QPlus eviction algorithm * style: fix clang-format line length in Clock2QPlus.c * fix: use PRIu64 for obj_id_t format specifier * fix: address code review findings in Clock2QPlus - comment corr_window_size_upper/lower_bound fields - fix time_since_insertion type: int -> int64_t - save obj_id before remove() to avoid potential UAF * fix: validate strsep key/value are non-NULL in Clock2QPlus param parser * test: add Clock2QPlus to test_evictionAlgo * docs: note Clock2QPlus requires --ignore-obj-size
1 parent f2f8b79 commit da022c2

7 files changed

Lines changed: 548 additions & 1 deletion

File tree

libCacheSim/bin/cachesim/cache_init.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ static inline cache_t *create_cache(const char *trace_path,
4141
{"CAR", CAR_init},
4242
{"cacheus", Cacheus_init},
4343
{"clock", Clock_init},
44+
{"clock2qplus", Clock2QPlus_init},
4445
{"clockpro", ClockPro_init},
4546
{"fifo", FIFO_init},
4647
{"fifo-merge", FIFO_Merge_init},

libCacheSim/cache/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ set(eviction_sources_c
3232
eviction/CAR.c
3333
eviction/Cacheus.c
3434
eviction/Clock.c
35+
eviction/Clock2QPlus.c
3536
eviction/ClockPro.c
3637
eviction/FIFO.c
3738
eviction/Hyperbolic.c

0 commit comments

Comments
 (0)