mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 11:05:46 +00:00
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.
This commit is contained in:
parent
f9b12a9612
commit
bfb412a71a
5 changed files with 42 additions and 29 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue