diff options
| author | 2021-02-12 17:38:40 -0800 | |
|---|---|---|
| committer | 2021-02-18 16:16:25 -0800 | |
| commit | b1e27890e8728c19ceef404aa6352cd6f2913ded (patch) | |
| tree | 6579ee15eeea8f2ce339a264bef80e5adc5a4dc8 /src/core/hle/kernel/process.cpp | |
| parent | hle: kernel: Migrate PageLinkedList to KPageLinkedList. (diff) | |
| download | yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar.gz yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.tar.xz yuzu-b1e27890e8728c19ceef404aa6352cd6f2913ded.zip | |
hle: kernel: Migrate MemoryManager to KMemoryManager.
Diffstat (limited to 'src/core/hle/kernel/process.cpp')
| -rw-r--r-- | src/core/hle/kernel/process.cpp | 9 |
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, | |||
| 274 | // Set initial resource limits | 274 | // Set initial resource limits |
| 275 | resource_limit->SetLimitValue( | 275 | resource_limit->SetLimitValue( |
| 276 | LimitableResource::PhysicalMemory, | 276 | LimitableResource::PhysicalMemory, |
| 277 | kernel.MemoryManager().GetSize(Memory::MemoryManager::Pool::Application)); | 277 | kernel.MemoryManager().GetSize(KMemoryManager::Pool::Application)); |
| 278 | KScopedResourceReservation memory_reservation(resource_limit, LimitableResource::PhysicalMemory, | 278 | KScopedResourceReservation memory_reservation(resource_limit, LimitableResource::PhysicalMemory, |
| 279 | code_size + system_resource_size); | 279 | code_size + system_resource_size); |
| 280 | if (!memory_reservation.Succeeded()) { | 280 | if (!memory_reservation.Succeeded()) { |
| @@ -285,7 +285,7 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, | |||
| 285 | // Initialize proces address space | 285 | // Initialize proces address space |
| 286 | if (const ResultCode result{ | 286 | if (const ResultCode result{ |
| 287 | page_table->InitializeForProcess(metadata.GetAddressSpaceType(), false, 0x8000000, | 287 | page_table->InitializeForProcess(metadata.GetAddressSpaceType(), false, 0x8000000, |
| 288 | code_size, Memory::MemoryManager::Pool::Application)}; | 288 | code_size, KMemoryManager::Pool::Application)}; |
| 289 | result.IsError()) { | 289 | result.IsError()) { |
| 290 | return result; | 290 | return result; |
| 291 | } | 291 | } |
| @@ -323,6 +323,11 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, | |||
| 323 | UNREACHABLE(); | 323 | UNREACHABLE(); |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | // Set initial resource limits | ||
| 327 | resource_limit->SetLimitValue( | ||
| 328 | LimitableResource::PhysicalMemory, | ||
| 329 | kernel.MemoryManager().GetSize(KMemoryManager::Pool::Application)); | ||
| 330 | |||
| 326 | resource_limit->SetLimitValue(LimitableResource::Threads, 608); | 331 | resource_limit->SetLimitValue(LimitableResource::Threads, 608); |
| 327 | resource_limit->SetLimitValue(LimitableResource::Events, 700); | 332 | resource_limit->SetLimitValue(LimitableResource::Events, 700); |
| 328 | resource_limit->SetLimitValue(LimitableResource::TransferMemory, 128); | 333 | resource_limit->SetLimitValue(LimitableResource::TransferMemory, 128); |