diff options
author | bunnei <bunneidev@gmail.com> | 2022-02-09 03:47:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-09 03:47:11 +0100 |
commit | d134ca68c6a24b62382061d66dae153fb73145f1 (patch) | |
tree | 38fde770dad4bee31d4f60b0083c9db3bf33b153 /src/core | |
parent | Merge pull request #7847 from tech-ticks/master (diff) | |
download | yuzu-d134ca68c6a24b62382061d66dae153fb73145f1.tar yuzu-d134ca68c6a24b62382061d66dae153fb73145f1.tar.gz yuzu-d134ca68c6a24b62382061d66dae153fb73145f1.tar.bz2 yuzu-d134ca68c6a24b62382061d66dae153fb73145f1.tar.lz yuzu-d134ca68c6a24b62382061d66dae153fb73145f1.tar.xz yuzu-d134ca68c6a24b62382061d66dae153fb73145f1.tar.zst yuzu-d134ca68c6a24b62382061d66dae153fb73145f1.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/k_code_memory.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_code_memory.cpp b/src/core/hle/kernel/k_code_memory.cpp index d69f7ffb7..2419d113b 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" @@ -29,7 +30,7 @@ ResultCode KCodeMemory::Initialize(Core::DeviceMemory& device_memory, VAddr addr // 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 +144,4 @@ ResultCode KCodeMemory::UnmapFromOwner(VAddr address, size_t size) { return ResultSuccess; } -} // namespace Kernel
\ No newline at end of file +} // namespace Kernel |