diff options
| author | 2018-09-24 20:01:45 -0400 | |
|---|---|---|
| committer | 2018-09-24 22:16:03 -0400 | |
| commit | 83377113bfe7791483a1b67e06dd0f51620c04ec (patch) | |
| tree | d766a2d2f20d247e8663c1a76d5c41fcf7f643d4 /src/core/hle/kernel/svc.cpp | |
| parent | svc: Report correct memory-related values within some of the cases in svcGetI... (diff) | |
| download | yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar.gz yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.tar.xz yuzu-83377113bfe7791483a1b67e06dd0f51620c04ec.zip | |
memory: Dehardcode the use of fixed memory range constants
The locations of these can actually vary depending on the address space
layout, so we shouldn't be using these when determining where to map
memory or be using them as offsets for calculations. This keeps all the
memory ranges flexible and malleable based off of the virtual memory
manager instance state.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index e0f5e3f39..c2b77eb49 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -51,8 +51,9 @@ static ResultCode SetHeapSize(VAddr* heap_addr, u64 heap_size) { | |||
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | auto& process = *Core::CurrentProcess(); | 53 | auto& process = *Core::CurrentProcess(); |
| 54 | const VAddr heap_base = process.vm_manager.GetHeapRegionBaseAddress(); | ||
| 54 | CASCADE_RESULT(*heap_addr, | 55 | CASCADE_RESULT(*heap_addr, |
| 55 | process.HeapAllocate(Memory::HEAP_VADDR, heap_size, VMAPermission::ReadWrite)); | 56 | process.HeapAllocate(heap_base, heap_size, VMAPermission::ReadWrite)); |
| 56 | return RESULT_SUCCESS; | 57 | return RESULT_SUCCESS; |
| 57 | } | 58 | } |
| 58 | 59 | ||