diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-11-11 15:45:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 15:45:29 +0100 |
commit | 40d4e9543b5792dfa761b44d4c6017d5692f77a3 (patch) | |
tree | 019cb6ca42ee3b89b400bb624e933abf695e150c /src/core/hle/kernel/svc/svc_physical_memory.cpp | |
parent | Merge pull request #11981 from lucasreis1/patch (diff) | |
parent | k_page_table: fix shutdown (diff) | |
download | yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.gz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.bz2 yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.lz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.xz yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.tar.zst yuzu-40d4e9543b5792dfa761b44d4c6017d5692f77a3.zip |
Diffstat (limited to 'src/core/hle/kernel/svc/svc_physical_memory.cpp')
-rw-r--r-- | src/core/hle/kernel/svc/svc_physical_memory.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc/svc_physical_memory.cpp b/src/core/hle/kernel/svc/svc_physical_memory.cpp index 99330d02a..793e9f8d0 100644 --- a/src/core/hle/kernel/svc/svc_physical_memory.cpp +++ b/src/core/hle/kernel/svc/svc_physical_memory.cpp @@ -16,7 +16,14 @@ Result SetHeapSize(Core::System& system, u64* out_address, u64 size) { R_UNLESS(size < MainMemorySizeMax, ResultInvalidSize); // Set the heap size. - R_RETURN(GetCurrentProcess(system.Kernel()).GetPageTable().SetHeapSize(out_address, size)); + KProcessAddress address{}; + R_TRY(GetCurrentProcess(system.Kernel()) + .GetPageTable() + .SetHeapSize(std::addressof(address), size)); + + // We succeeded. + *out_address = GetInteger(address); + R_SUCCEED(); } /// Maps memory at a desired address |