diff options
| author | 2019-06-09 20:43:03 -0400 | |
|---|---|---|
| committer | 2019-06-09 20:43:03 -0400 | |
| commit | 4486103e1dd50aa435ce2f392241ea50f60a359f (patch) | |
| tree | 59b7c0e6fa849694b5e4c34f573310589e342496 /src/core/hle/kernel/process.cpp | |
| parent | Merge pull request #2564 from ReinUsesLisp/block-dim-x-fix (diff) | |
| parent | kernel/svc: Implement TotalMemoryUsedWithoutMmHeap/TotalMemoryAvailableWithou... (diff) | |
| download | yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar.gz yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar.xz yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.zip | |
Merge pull request #2570 from lioncash/svc
kernel/svc: Handle TotalPhysicalMemoryAvailableWithoutMmHeap and TotalPhysicalMemoryUsedWithoutMmHeap
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 0775a89fb..63a3707b2 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -72,10 +72,26 @@ SharedPtr<ResourceLimit> Process::GetResourceLimit() const { | |||
| 72 | return resource_limit; | 72 | return resource_limit; |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | u64 Process::GetTotalPhysicalMemoryAvailable() const { | ||
| 76 | return vm_manager.GetTotalPhysicalMemoryAvailable(); | ||
| 77 | } | ||
| 78 | |||
| 79 | u64 Process::GetTotalPhysicalMemoryAvailableWithoutMmHeap() const { | ||
| 80 | // TODO: Subtract the personal heap size from this when the | ||
| 81 | // personal heap is implemented. | ||
| 82 | return GetTotalPhysicalMemoryAvailable(); | ||
| 83 | } | ||
| 84 | |||
| 75 | u64 Process::GetTotalPhysicalMemoryUsed() const { | 85 | u64 Process::GetTotalPhysicalMemoryUsed() const { |
| 76 | return vm_manager.GetCurrentHeapSize() + main_thread_stack_size + code_memory_size; | 86 | return vm_manager.GetCurrentHeapSize() + main_thread_stack_size + code_memory_size; |
| 77 | } | 87 | } |
| 78 | 88 | ||
| 89 | u64 Process::GetTotalPhysicalMemoryUsedWithoutMmHeap() const { | ||
| 90 | // TODO: Subtract the personal heap size from this when the | ||
| 91 | // personal heap is implemented. | ||
| 92 | return GetTotalPhysicalMemoryUsed(); | ||
| 93 | } | ||
| 94 | |||
| 79 | void Process::RegisterThread(const Thread* thread) { | 95 | void Process::RegisterThread(const Thread* thread) { |
| 80 | thread_list.push_back(thread); | 96 | thread_list.push_back(thread); |
| 81 | } | 97 | } |