diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-07-12 05:07:49 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-07-12 05:07:49 +0200 |
commit | 4e900d56f3dd2b5c9871b523689322028123d891 (patch) | |
tree | 2b233263cff7c001506f660373e2364c8e702637 /src/core/hle/kernel/vm_manager.cpp | |
parent | Merge pull request #914 from yuriks/bitfield-mask (diff) | |
parent | Core: Properly configure address space when loading a binary (diff) | |
download | yuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar yuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar.gz yuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar.bz2 yuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar.lz yuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar.xz yuzu-4e900d56f3dd2b5c9871b523689322028123d891.tar.zst yuzu-4e900d56f3dd2b5c9871b523689322028123d891.zip |
Diffstat (limited to 'src/core/hle/kernel/vm_manager.cpp')
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index ec437cd61..205cc7b53 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -35,6 +35,10 @@ VMManager::VMManager() { Reset(); } +VMManager::~VMManager() { + Reset(); +} + void VMManager::Reset() { vma_map.clear(); @@ -130,6 +134,16 @@ void VMManager::Reprotect(VMAHandle vma_handle, VMAPermission new_perms) { MergeAdjacent(iter); } +void VMManager::LogLayout() const { + for (const auto& p : vma_map) { + const VirtualMemoryArea& vma = p.second; + LOG_DEBUG(Kernel, "%08X - %08X size: %8X %c%c%c", vma.base, vma.base + vma.size, vma.size, + (u8)vma.permissions & (u8)VMAPermission::Read ? 'R' : '-', + (u8)vma.permissions & (u8)VMAPermission::Write ? 'W' : '-', + (u8)vma.permissions & (u8)VMAPermission::Execute ? 'X' : '-'); + } +} + VMManager::VMAIter VMManager::StripIterConstness(const VMAHandle & iter) { // This uses a neat C++ trick to convert a const_iterator to a regular iterator, given // non-const access to its container. |