38 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__ 39 #define __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__ 44 struct SecondChanceRPParams;
71 const std::shared_ptr<SecondChanceReplData>& replacement_data)
const;
94 void invalidate(
const std::shared_ptr<ReplacementData>& replacement_data)
102 void touch(
const std::shared_ptr<ReplacementData>& replacement_data)
const 112 void reset(
const std::shared_ptr<ReplacementData>& replacement_data)
const 133 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__ SecondChanceReplData()
Default constructor.
void useSecondChance(const std::shared_ptr< SecondChanceReplData > &replacement_data) const
Use replacement data's second chance.
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its re-insertion tick and second chance bit.
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Second-Chance-specific implementation of replacement data.
SecondChanceRP(const Params *p)
Construct and initiliaze this replacement policy.
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using insertion timestamps and second chance bit.
SecondChanceRPParams Params
Convenience typedef.
~SecondChanceRP()
Destructor.
bool hasSecondChance
This is different from isTouched because isTouched accounts only for insertion, while this bit is res...
FIFO-specific implementation of replacement data.
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
Copyright (c) 2018 Inria All rights reserved.