sylab / cacheus

The design and algorithms used in Cacheus are described in this USENIX FAST'21 paper and talk video: https://www.usenix.org/conference/fast21/presentation/rodriguez
59 stars 17 forks source link

BUGFIX: Add local function scoped counts to adjustSize #4

Closed slyon001 closed 3 years ago

slyon001 commented 3 years ago

Avoiding overwriting Cacheus's counts by using function scoped variables. Also avoids incrementing these counts unnecessarily without being able to decrement this extra increment away later. Simplify prevention of division by zero errors by localizing the max call to only relevant denominator within if-else blocks.