diff options
| author | Zach Hilman <DarkLordZach@users.noreply.github.com> | 2019-06-09 20:43:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-09 20:43:03 -0400 |
| commit | 4486103e1dd50aa435ce2f392241ea50f60a359f (patch) | |
| tree | 59b7c0e6fa849694b5e4c34f573310589e342496 /src/core/hle/kernel/process.cpp | |
| parent | 834e07d639b08d94a8dba0e8a16611c7d422eed1 (diff) | |
| parent | 3f87664d8fac06b024b0a59adfdfe570ab6195e5 (diff) | |
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 { return resource_limit; } +u64 Process::GetTotalPhysicalMemoryAvailable() const { + return vm_manager.GetTotalPhysicalMemoryAvailable(); +} + +u64 Process::GetTotalPhysicalMemoryAvailableWithoutMmHeap() const { + // TODO: Subtract the personal heap size from this when the + // personal heap is implemented. + return GetTotalPhysicalMemoryAvailable(); +} + u64 Process::GetTotalPhysicalMemoryUsed() const { return vm_manager.GetCurrentHeapSize() + main_thread_stack_size + code_memory_size; } +u64 Process::GetTotalPhysicalMemoryUsedWithoutMmHeap() const { + // TODO: Subtract the personal heap size from this when the + // personal heap is implemented. + return GetTotalPhysicalMemoryUsed(); +} + void Process::RegisterThread(const Thread* thread) { thread_list.push_back(thread); } |
