Skip to content
Snippets Groups Projects
Commit 8fb13372 authored by Liam's avatar Liam
Browse files

k_page_table: skip page table clearing on finalization

parent 53f904b7
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "common/assert.h" #include "common/assert.h"
#include "common/literals.h" #include "common/literals.h"
#include "common/scope_exit.h" #include "common/scope_exit.h"
#include "common/settings.h"
#include "core/core.h" #include "core/core.h"
#include "core/hle/kernel/k_address_space_info.h" #include "core/hle/kernel/k_address_space_info.h"
#include "core/hle/kernel/k_memory_block.h" #include "core/hle/kernel/k_memory_block.h"
...@@ -337,11 +338,14 @@ Result KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type ...@@ -337,11 +338,14 @@ Result KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type
} }
void KPageTable::Finalize() { void KPageTable::Finalize() {
auto HostUnmapCallback = [&](KProcessAddress addr, u64 size) {
if (Settings::IsFastmemEnabled()) {
m_system.DeviceMemory().buffer.Unmap(GetInteger(addr), size);
}
};
// Finalize memory blocks. // Finalize memory blocks.
m_memory_block_manager.Finalize(m_memory_block_slab_manager, m_memory_block_manager.Finalize(m_memory_block_slab_manager, std::move(HostUnmapCallback));
[&](KProcessAddress addr, u64 size) {
m_memory->UnmapRegion(*m_page_table_impl, addr, size);
});
// Release any insecure mapped memory. // Release any insecure mapped memory.
if (m_mapped_insecure_memory) { if (m_mapped_insecure_memory) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment