second_chance_rp.hh (12685:dcf85db6ec5c) second_chance_rp.hh (12727:56c23b54bcb1)
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
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"
43#include "mem/cache/replacement_policies/fifo_rp.hh"
44#include "mem/cache/replacement_policies/fifo_rp.hh"
44#include "params/SecondChanceRP.hh"
45
45
46struct SecondChanceRPParams;
47
46class SecondChanceRP : public FIFORP
47{
48 protected:
49 /** Second-Chance-specific implementation of replacement data. */
50 struct SecondChanceReplData : public FIFOReplData
51 {
52 /**
53 * This is different from isTouched because isTouched accounts only

--- 80 unchanged lines hidden ---
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 ---