diff options
author | bunnei <bunneidev@gmail.com> | 2022-10-29 23:23:14 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-11-04 05:17:07 +0100 |
commit | 1f21fa866dc1faaab47814fb7d1ce4749a5d613e (patch) | |
tree | 2a0263e22895ef3d7798d9df9daa68d7d325a27d /src/core/hle/kernel/k_memory_layout.cpp | |
parent | core: hle: kernel: k_memory_region_type: Refresh. (diff) | |
download | yuzu-1f21fa866dc1faaab47814fb7d1ce4749a5d613e.tar yuzu-1f21fa866dc1faaab47814fb7d1ce4749a5d613e.tar.gz yuzu-1f21fa866dc1faaab47814fb7d1ce4749a5d613e.tar.bz2 yuzu-1f21fa866dc1faaab47814fb7d1ce4749a5d613e.tar.lz yuzu-1f21fa866dc1faaab47814fb7d1ce4749a5d613e.tar.xz yuzu-1f21fa866dc1faaab47814fb7d1ce4749a5d613e.tar.zst yuzu-1f21fa866dc1faaab47814fb7d1ce4749a5d613e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_memory_layout.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/hle/kernel/k_memory_layout.cpp b/src/core/hle/kernel/k_memory_layout.cpp index 55dc296d0..72c3ee4b7 100644 --- a/src/core/hle/kernel/k_memory_layout.cpp +++ b/src/core/hle/kernel/k_memory_layout.cpp @@ -153,13 +153,9 @@ void KMemoryLayout::InitializeLinearMemoryRegionTrees(PAddr aligned_linear_phys_ } } -size_t KMemoryLayout::GetResourceRegionSizeForInit() { - // Calculate resource region size based on whether we allow extra threads. - const bool use_extra_resources = KSystemControl::Init::ShouldIncreaseThreadResourceLimit(); - size_t resource_region_size = - KernelResourceSize + (use_extra_resources ? KernelSlabHeapAdditionalSize : 0); - - return resource_region_size; +size_t KMemoryLayout::GetResourceRegionSizeForInit(bool use_extra_resource) { + return KernelResourceSize + KSystemControl::SecureAppletMemorySize + + (use_extra_resource ? KernelSlabHeapAdditionalSize + KernelPageBufferAdditionalSize : 0); } } // namespace Kernel |