summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-10 00:20:20 +0200
committerLioncash <mathew1800@gmail.com>2019-06-10 00:22:30 +0200
commit3f87664d8fac06b024b0a59adfdfe570ab6195e5 (patch)
tree59b7c0e6fa849694b5e4c34f573310589e342496 /src/core/hle/kernel/process.cpp
parentkernel/svc: Amend naming for TotalMemoryUsage in svcGetInfo() (diff)
downloadyuzu-3f87664d8fac06b024b0a59adfdfe570ab6195e5.tar
yuzu-3f87664d8fac06b024b0a59adfdfe570ab6195e5.tar.gz
yuzu-3f87664d8fac06b024b0a59adfdfe570ab6195e5.tar.bz2
yuzu-3f87664d8fac06b024b0a59adfdfe570ab6195e5.tar.lz
yuzu-3f87664d8fac06b024b0a59adfdfe570ab6195e5.tar.xz
yuzu-3f87664d8fac06b024b0a59adfdfe570ab6195e5.tar.zst
yuzu-3f87664d8fac06b024b0a59adfdfe570ab6195e5.zip
Diffstat (limited to '')
-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);
}