1/** 2 * Copyright (c) 2018 Inria 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 26 unchanged lines hidden (view full) --- 35 * to be evicted, if it hasn't been touched since its insertion. If it 36 * has been touched, it is given a second chance and re-inserted at the 37 * end of the queue. 38 */ 39 40#ifndef __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__ 41#define __MEM_CACHE_REPLACEMENT_POLICIES_SECOND_CHANCE_RP_HH__ 42 |
43#include "mem/cache/replacement_policies/base.hh" |
44#include "mem/cache/replacement_policies/fifo_rp.hh" |
45 |
46struct SecondChanceRPParams; 47 |
48class SecondChanceRP : public FIFORP 49{ 50 protected: 51 /** Second-Chance-specific implementation of replacement data. */ 52 struct SecondChanceReplData : public FIFOReplData 53 { 54 /** 55 * This is different from isTouched because isTouched accounts only --- 80 unchanged lines hidden --- |