summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-03 02:06:21 +0200
committerbunnei <bunneidev@gmail.com>2021-05-06 01:40:50 +0200
commit340167676828bf4595bc267c927f156a11b288aa (patch)
treea8af50757dcea3878ae928d491f4108d392e29aa /src/core/memory.h
parentcommon: common_funcs: Add Size helper function. (diff)
downloadyuzu-340167676828bf4595bc267c927f156a11b288aa.tar
yuzu-340167676828bf4595bc267c927f156a11b288aa.tar.gz
yuzu-340167676828bf4595bc267c927f156a11b288aa.tar.bz2
yuzu-340167676828bf4595bc267c927f156a11b288aa.tar.lz
yuzu-340167676828bf4595bc267c927f156a11b288aa.tar.xz
yuzu-340167676828bf4595bc267c927f156a11b288aa.tar.zst
yuzu-340167676828bf4595bc267c927f156a11b288aa.zip
Diffstat (limited to 'src/core/memory.h')
-rw-r--r--src/core/memory.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index 6d34fcfe2..9a706a9ac 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -59,6 +59,11 @@ public:
Memory& operator=(Memory&&) = default;
/**
+ * Resets the state of the Memory system.
+ */
+ void Reset();
+
+ /**
* Changes the currently active page table to that of the given process instance.
*
* @param process The process to use the page table of.
@@ -116,6 +121,15 @@ public:
*/
u8* GetPointer(VAddr vaddr);
+ /**
+ * Gets a pointer to the start of a kernel heap allocated memory region. Will allocate one if it
+ * does not already exist.
+ *
+ * @param start_vaddr Start virtual address for the memory region.
+ * @param size Size of the memory region.
+ */
+ u8* GetKernelBuffer(VAddr start_vaddr, size_t size);
+
template <typename T>
T* GetPointer(VAddr vaddr) {
return reinterpret_cast<T*>(GetPointer(vaddr));
@@ -524,6 +538,8 @@ public:
void RasterizerMarkRegionCached(VAddr vaddr, u64 size, bool cached);
private:
+ Core::System& system;
+
struct Impl;
std::unique_ptr<Impl> impl;
};