Commit 5bf890e
authored
[Fix] TwoQ crashes when the LRU cache is empty (#295)
* [Fix] pkgconf should be installed explicitly on macos
* [Fix] TwoQ crashes when the LRU cache is empty
When `TwoQ_evict` is called while Ain is within the size limit, the function
will try to do eviction on Am. But when Am is empty, an assertion failure will
be encountered. This commit fix the issue by checking whether the Am is able
to evict elements.1 parent 938827d commit 5bf890e
File tree
2 files changed
+6
-6
lines changed- libCacheSim/cache/eviction
- scripts
2 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
270 | | - | |
271 | 274 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
| 127 | + | |
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| |||
0 commit comments