Struct pagecache::ds::Lru
[−]
[src]
pub struct Lru { /* fields omitted */ }
A simple Lru cache.
Methods
impl Lru
[src]
fn new(cache_capacity: usize, cache_bits: usize) -> Lru
[src]
Instantiates a new Lru
cache.
fn accessed(&self, pid: PageID, sz: usize) -> Vec<PageID>
[src]
Called when a page is accessed. Returns a Vec of pages to
try to page-out. For each one of these, the caller is expected
to call page_out_succeeded
if the page-out succeeded.