62 assert(candidates.size() > 0);
68 for (
const auto& candidate : candidates) {
70 std::shared_ptr<WeightedLRUReplData> candidate_replacement_data =
71 std::static_pointer_cast<WeightedLRUReplData>(
72 candidate->replacementData);
74 std::shared_ptr<WeightedLRUReplData> victim_replacement_data =
75 std::static_pointer_cast<WeightedLRUReplData>(
78 if (candidate_replacement_data->last_occ_ptr <
79 victim_replacement_data->last_occ_ptr) {
81 }
else if (candidate_replacement_data->last_occ_ptr ==
82 victim_replacement_data->last_occ_ptr) {
84 Tick time = candidate_replacement_data->lastTouchTick;
85 if (time < victim_replacement_data->lastTouchTick) {
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
std::shared_ptr< replacement_policy::ReplacementData > replacementData
Replacement data associated to this entry.