summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-11-26 21:19:15 +0100
committerLioncash <mathew1800@gmail.com>2019-11-27 03:55:38 +0100
commit3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef (patch)
tree0e13cc5e2595d7019f8e9e80fe0279dc6a2b1d4c /src/core/memory.h
parentcore: Prepare various classes for memory read/write migration (diff)
downloadyuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar
yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.gz
yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.bz2
yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.lz
yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.xz
yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.tar.zst
yuzu-3f08e8d8d4ef16cf2468620fbfbdac46e43dcaef.zip
Diffstat (limited to 'src/core/memory.h')
-rw-r--r--src/core/memory.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index cacf4fb1a..59b9ce2bb 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -132,6 +132,26 @@ public:
*/
bool IsValidVirtualAddress(VAddr vaddr) const;
+ /**
+ * Gets a pointer to the given address.
+ *
+ * @param vaddr Virtual address to retrieve a pointer to.
+ *
+ * @returns The pointer to the given address, if the address is valid.
+ * If the address is not valid, nullptr will be returned.
+ */
+ u8* GetPointer(VAddr vaddr);
+
+ /**
+ * Gets a pointer to the given address.
+ *
+ * @param vaddr Virtual address to retrieve a pointer to.
+ *
+ * @returns The pointer to the given address, if the address is valid.
+ * If the address is not valid, nullptr will be returned.
+ */
+ const u8* GetPointer(VAddr vaddr) const;
+
private:
struct Impl;
std::unique_ptr<Impl> impl;
@@ -162,8 +182,6 @@ void WriteBlock(VAddr dest_addr, const void* src_buffer, std::size_t size);
void ZeroBlock(const Kernel::Process& process, VAddr dest_addr, std::size_t size);
void CopyBlock(VAddr dest_addr, VAddr src_addr, std::size_t size);
-u8* GetPointer(VAddr vaddr);
-
std::string ReadCString(VAddr vaddr, std::size_t max_length);
/**