From 4fa5ef65227294b6e755bca45eae1eb6a82be7cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20F=C3=BCrst?= Date: Wed, 10 Jan 2024 19:21:44 +0100 Subject: [PATCH] accept existing cache if the cached block is larger than the requested view --- offloading-cacher/cache.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/offloading-cacher/cache.hpp b/offloading-cacher/cache.hpp index cce0439..50e9c29 100644 --- a/offloading-cacher/cache.hpp +++ b/offloading-cacher/cache.hpp @@ -359,9 +359,8 @@ inline std::unique_ptr dsacache::Cache::GetFromCache(uint8_ if (search != cache_state_[dst_node].end()) { // now check whether the sizes match - // TODO: second.size_ >= size would also work - if (search->second.size_ == size) { + if (search->second.size_ >= size) { std::cout << "[+] Found Cached version for 0x" << std::hex << (uint64_t)src << std::dec << std::endl; // return a unique copy of the entry which uses the object