summaryrefslogtreecommitdiff
path: root/src/core/memory.h
diff options
context:
space:
mode:
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:
59 Memory& operator=(Memory&&) = default; 59 Memory& operator=(Memory&&) = default;
60 60
61 /** 61 /**
62 * Resets the state of the Memory system.
63 */
64 void Reset();
65
66 /**
62 * Changes the currently active page table to that of the given process instance. 67 * Changes the currently active page table to that of the given process instance.
63 * 68 *
64 * @param process The process to use the page table of. 69 * @param process The process to use the page table of.
@@ -116,6 +121,15 @@ public:
116 */ 121 */
117 u8* GetPointer(VAddr vaddr); 122 u8* GetPointer(VAddr vaddr);
118 123
124 /**
125 * Gets a pointer to the start of a kernel heap allocated memory region. Will allocate one if it
126 * does not already exist.
127 *
128 * @param start_vaddr Start virtual address for the memory region.
129 * @param size Size of the memory region.
130 */
131 u8* GetKernelBuffer(VAddr start_vaddr, size_t size);
132
119 template <typename T> 133 template <typename T>
120 T* GetPointer(VAddr vaddr) { 134 T* GetPointer(VAddr vaddr) {
121 return reinterpret_cast<T*>(GetPointer(vaddr)); 135 return reinterpret_cast<T*>(GetPointer(vaddr));
@@ -524,6 +538,8 @@ public:
524 void RasterizerMarkRegionCached(VAddr vaddr, u64 size, bool cached); 538 void RasterizerMarkRegionCached(VAddr vaddr, u64 size, bool cached);
525 539
526private: 540private:
541 Core::System& system;
542
527 struct Impl; 543 struct Impl;
528 std::unique_ptr<Impl> impl; 544 std::unique_ptr<Impl> impl;
529}; 545};