mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-20 07:49:59 +00:00
k_page_table: skip page table clearing on finalization
This commit is contained in:
parent
53f904b740
commit
8fb13372c2
1 changed files with 8 additions and 4 deletions
|
@ -5,6 +5,7 @@
|
|||
#include "common/assert.h"
|
||||
#include "common/literals.h"
|
||||
#include "common/scope_exit.h"
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/kernel/k_address_space_info.h"
|
||||
#include "core/hle/kernel/k_memory_block.h"
|
||||
|
@ -337,11 +338,14 @@ Result KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type
|
|||
}
|
||||
|
||||
void KPageTable::Finalize() {
|
||||
auto HostUnmapCallback = [&](KProcessAddress addr, u64 size) {
|
||||
if (Settings::IsFastmemEnabled()) {
|
||||
m_system.DeviceMemory().buffer.Unmap(GetInteger(addr), size);
|
||||
}
|
||||
};
|
||||
|
||||
// Finalize memory blocks.
|
||||
m_memory_block_manager.Finalize(m_memory_block_slab_manager,
|
||||
[&](KProcessAddress addr, u64 size) {
|
||||
m_memory->UnmapRegion(*m_page_table_impl, addr, size);
|
||||
});
|
||||
m_memory_block_manager.Finalize(m_memory_block_slab_manager, std::move(HostUnmapCallback));
|
||||
|
||||
// Release any insecure mapped memory.
|
||||
if (m_mapped_insecure_memory) {
|
||||
|
|
Loading…
Reference in a new issue