51 WeightedLRUReplacementPolicyParams::create()
71 assert(index >= 0 && index <
m_assoc);
80 assert(index >= 0 && index <
m_assoc);
90 Tick time, smallest_time;
91 int64_t smallest_index;
100 if (weight < smallest_weight) {
101 smallest_weight = weight;
104 }
else if (weight == smallest_weight) {
106 if (time < smallest_time) {
108 smallest_time = time;
112 return smallest_index;
ReplacementPolicyParams Params
unsigned m_assoc
total number of sets
Tick ** m_last_ref_ptr
set associativity
void touch(int64_t set, int64_t way, Tick time) override
int64_t getVictim(int64_t set) const override
WeightedLRUPolicy(const Params *p)
uint64_t Tick
Tick count type.