From 03036ff18520fdeb33ac1564dfcdbcfa0c840a07 Mon Sep 17 00:00:00 2001 From: ag Date: Tue, 17 Sep 2024 10:24:26 +0300 Subject: [PATCH] last commit --- 2Q_cache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2Q_cache.h b/2Q_cache.h index 72f89e0..f61820c 100644 --- a/2Q_cache.h +++ b/2Q_cache.h @@ -21,7 +21,7 @@ public: TwoCache(size_t q1sz, size_t q2sz): cpct_q1(q1sz), cpct_q2(q2sz) {} //ctor void put_page(int id) { - if (umap1.find(id) != umap1.end()) { //page is in fast queue in the end, nothing to do (fast case) + if (umap1.find(id) != umap1.end()) { //page is found, nothing to do (fast case) return; } else if (umap2.find(id) != umap2.end()) { q2.erase(umap2[id]); //if page is in slow put it in fast @@ -52,7 +52,7 @@ public: return; } } - + void print_info() { std::cout << "\nq1 (the most usable): ";