aboutsummaryrefslogtreecommitdiff
path: root/src/common/host_memory.h
diff options
context:
space:
mode:
authorTakoroka <137927095+Takoroka@users.noreply.github.com>2026-11-01 13:25:46 -0500
committerTakoroka <137927095+Takoroka@users.noreply.github.com>2026-11-01 13:25:46 -0500
commit9ee8d6f6a6900537eccf67e4c3a9bb16248dc6ab (patch)
tree66082e3914f210cfdcb144c67e98a3aa16b5b5b4 /src/common/host_memory.h
parentf695266b80ba1e8a4a4f2f8421d65ed224068c7a (diff)
parent86968cb5ce3195cb131eeb0ef68d2d8a4860f7df (diff)
Merge remote-tracking branch 'origin/fix/cold-hint-uploaded-memory' into test/linux-all-prs
Diffstat (limited to 'src/common/host_memory.h')
-rw-r--r--src/common/host_memory.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/host_memory.h b/src/common/host_memory.h
index 8747a1850f..4d8d15cf58 100644
--- a/src/common/host_memory.h
+++ b/src/common/host_memory.h
@@ -54,6 +54,12 @@ public:
void ClearBackingRegion(size_t physical_offset, size_t length, u32 fill_value);
+ /// 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) const;
+
[[nodiscard]] u8* BackingBasePointer() noexcept {
return backing_base;
}