diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-12-06 10:59:22 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-12-06 15:02:17 -0500 |
| commit | d4c1b9d311c978a6354574d09c451522ceb74e82 (patch) | |
| tree | 4fd85da1f82ec31892c6645e45d2a04f6e010b9f /src/core/hle/kernel/vm_manager.cpp | |
| parent | 4d3d2fcebde1cb2347b4da83471d01858da7f958 (diff) | |
vm_manager: Make vma_map private
This was only ever public so that code could check whether or not a
handle was valid or not. Instead of exposing the object directly and
allowing external code to potentially mess with the map contents, we
just provide a member function that allows checking whether or not a
handle is valid.
This makes all member variables of the VMManager class private except
for the page table.
Diffstat (limited to 'src/core/hle/kernel/vm_manager.cpp')
| -rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index 100f8f6bf..6187993ce 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -87,6 +87,10 @@ VMManager::VMAHandle VMManager::FindVMA(VAddr target) const { } } +bool VMManager::IsValidHandle(VMAHandle handle) const { + return handle != vma_map.cend(); +} + ResultVal<VMManager::VMAHandle> VMManager::MapMemoryBlock(VAddr target, std::shared_ptr<std::vector<u8>> block, std::size_t offset, u64 size, |
