diff options
author | Lioncash <mathew1800@gmail.com> | 2019-11-26 19:46:41 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-11-27 03:53:34 +0100 |
commit | e58748fd802dc069e90928d12d4db9ff994a869d (patch) | |
tree | 152c306a9a51f0ba49e2a34d1dc0db9eb2923013 /src/core/memory.h | |
parent | core/memory: Migrate over memory mapping functions to the new Memory class (diff) | |
download | yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.gz yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.bz2 yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.lz yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.xz yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.tar.zst yuzu-e58748fd802dc069e90928d12d4db9ff994a869d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/memory.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/core/memory.h b/src/core/memory.h index 87ed3b696..cacf4fb1a 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -111,6 +111,27 @@ public: void RemoveDebugHook(Common::PageTable& page_table, VAddr base, u64 size, Common::MemoryHookPointer hook); + /** + * Checks whether or not the supplied address is a valid virtual + * address for the given process. + * + * @param process The emulated process to check the address against. + * @param vaddr The virtual address to check the validity of. + * + * @returns True if the given virtual address is valid, false otherwise. + */ + bool IsValidVirtualAddress(const Kernel::Process& process, VAddr vaddr) const; + + /** + * Checks whether or not the supplied address is a valid virtual + * address for the current process. + * + * @param vaddr The virtual address to check the validity of. + * + * @returns True if the given virtual address is valid, false otherwise. + */ + bool IsValidVirtualAddress(VAddr vaddr) const; + private: struct Impl; std::unique_ptr<Impl> impl; @@ -120,9 +141,6 @@ private: /// the given process instance. void SetCurrentPageTable(Kernel::Process& process); -/// Determines if the given VAddr is valid for the specified process. -bool IsValidVirtualAddress(const Kernel::Process& process, VAddr vaddr); -bool IsValidVirtualAddress(VAddr vaddr); /// Determines if the given VAddr is a kernel address bool IsKernelVirtualAddress(VAddr vaddr); |