diff options
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r-- | src/core/hle/kernel/process.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 0775a89fb..2b81a8d4f 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp @@ -48,7 +48,7 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) { } } // Anonymous namespace -SharedPtr<Process> Process::Create(Core::System& system, std::string&& name) { +SharedPtr<Process> Process::Create(Core::System& system, std::string name) { auto& kernel = system.Kernel(); SharedPtr<Process> process(new Process(system)); @@ -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); } |