aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/host_memory.cpp2
-rw-r--r--src/common/host_memory.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp
index c0e7160dd4..2c45dfd3a5 100644
--- a/src/common/host_memory.cpp
+++ b/src/common/host_memory.cpp
@@ -791,7 +791,7 @@ void HostMemory::Protect(size_t virtual_offset, size_t length, MemoryPermission
}
void HostMemory::HintCold(size_t physical_offset, size_t length,
- std::optional<size_t> virtual_offset) {
+ std::optional<size_t> virtual_offset) const {
if (length == 0 || backing_base == nullptr) {
return;
}
diff --git a/src/common/host_memory.h b/src/common/host_memory.h
index fe0938103c..4d8d15cf58 100644
--- a/src/common/host_memory.h
+++ b/src/common/host_memory.h
@@ -57,7 +57,8 @@ public:
/// Memory written once and read again rarely: its pages leave the working set (backing and,
/// when given, its view at virtual_offset), so the OS compresses or pages them out first when
/// it needs RAM. The contents stay; using the pages brings them back.
- void HintCold(size_t physical_offset, size_t length, std::optional<size_t> virtual_offset);
+ void HintCold(size_t physical_offset, size_t length,
+ std::optional<size_t> virtual_offset) const;
[[nodiscard]] u8* BackingBasePointer() noexcept {
return backing_base;