diff options
author | bunnei <bunneidev@gmail.com> | 2022-02-09 19:29:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-09 19:29:32 +0100 |
commit | bcd666b86bc9db78733e61bd82b6a60ebe593b80 (patch) | |
tree | d0983e02c0426bb89b95db6f687be943aa719cdd | |
parent | Merge pull request #7847 from tech-ticks/master (diff) | |
parent | hle: kernel: KCodeMemory: Remove unused QueryMemory. (diff) | |
download | yuzu-bcd666b86bc9db78733e61bd82b6a60ebe593b80.tar yuzu-bcd666b86bc9db78733e61bd82b6a60ebe593b80.tar.gz yuzu-bcd666b86bc9db78733e61bd82b6a60ebe593b80.tar.bz2 yuzu-bcd666b86bc9db78733e61bd82b6a60ebe593b80.tar.lz yuzu-bcd666b86bc9db78733e61bd82b6a60ebe593b80.tar.xz yuzu-bcd666b86bc9db78733e61bd82b6a60ebe593b80.tar.zst yuzu-bcd666b86bc9db78733e61bd82b6a60ebe593b80.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_code_memory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_code_memory.cpp b/src/core/hle/kernel/k_code_memory.cpp index d69f7ffb7..0b225e8e0 100644 --- a/src/core/hle/kernel/k_code_memory.cpp +++ b/src/core/hle/kernel/k_code_memory.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include "common/alignment.h" #include "common/common_types.h" #include "core/device_memory.h" #include "core/hle/kernel/k_auto_object.h" @@ -28,8 +29,7 @@ ResultCode KCodeMemory::Initialize(Core::DeviceMemory& device_memory, VAddr addr auto& page_table = m_owner->PageTable(); // Construct the page group. - KMemoryInfo kBlockInfo = page_table.QueryInfo(addr); - m_page_group = KPageLinkedList(kBlockInfo.GetAddress(), kBlockInfo.GetNumPages()); + m_page_group = KPageLinkedList(addr, Common::DivideUp(size, PageSize)); // Lock the memory. R_TRY(page_table.LockForCodeMemory(addr, size)) @@ -143,4 +143,4 @@ ResultCode KCodeMemory::UnmapFromOwner(VAddr address, size_t size) { return ResultSuccess; } -} // namespace Kernel
\ No newline at end of file +} // namespace Kernel |