summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-02-13 02:38:40 +0100
committerbunnei <bunneidev@gmail.com>2021-02-19 01:16:25 +0100
commitb1e27890e8728c19ceef404aa6352cd6f2913ded (patch)
tree6579ee15eeea8f2ce339a264bef80e5adc5a4dc8 /src/core/hle/kernel/process.cpp
parenthle: kernel: Migrate PageLinkedList to KPageLinkedList. (diff)
downloadyuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar
yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar.gz
yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar.bz2
yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar.lz
yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar.xz
yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar.zst
yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.zip
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
-rw-r--r--src/core/hle/kernel/process.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index f83977a8e..e0359eb3c 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -274,7 +274,7 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata,
// Set initial resource limits
resource_limit->SetLimitValue(
LimitableResource::PhysicalMemory,
- kernel.MemoryManager().GetSize(Memory::MemoryManager::Pool::Application));
+ kernel.MemoryManager().GetSize(KMemoryManager::Pool::Application));
KScopedResourceReservation memory_reservation(resource_limit, LimitableResource::PhysicalMemory,
code_size + system_resource_size);
if (!memory_reservation.Succeeded()) {
@@ -285,7 +285,7 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata,
// Initialize proces address space
if (const ResultCode result{
page_table->InitializeForProcess(metadata.GetAddressSpaceType(), false, 0x8000000,
- code_size, Memory::MemoryManager::Pool::Application)};
+ code_size, KMemoryManager::Pool::Application)};
result.IsError()) {
return result;
}
@@ -323,6 +323,11 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata,
UNREACHABLE();
}
+ // Set initial resource limits
+ resource_limit->SetLimitValue(
+ LimitableResource::PhysicalMemory,
+ kernel.MemoryManager().GetSize(KMemoryManager::Pool::Application));
+
resource_limit->SetLimitValue(LimitableResource::Threads, 608);
resource_limit->SetLimitValue(LimitableResource::Events, 700);
resource_limit->SetLimitValue(LimitableResource::TransferMemory, 128);