summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorZach Hilman <DarkLordZach@users.noreply.github.com>2019-06-10 02:43:03 +0200
committerGitHub <noreply@github.com>2019-06-10 02:43:03 +0200
commit4486103e1dd50aa435ce2f392241ea50f60a359f (patch)
tree59b7c0e6fa849694b5e4c34f573310589e342496 /src/core/hle/kernel/process.cpp
parentMerge pull request #2564 from ReinUsesLisp/block-dim-x-fix (diff)
parentkernel/svc: Implement TotalMemoryUsedWithoutMmHeap/TotalMemoryAvailableWithoutMmHeap (diff)
downloadyuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar
yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar.gz
yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar.bz2
yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar.lz
yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar.xz
yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.tar.zst
yuzu-4486103e1dd50aa435ce2f392241ea50f60a359f.zip
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r--src/core/hle/kernel/process.cpp16
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);
}