kern: increase stack region size when thread resource limit is increased

This commit is contained in:
Michael Scire 2022-10-11 22:52:09 -07:00
parent e4825cc879
commit 5f10b6670d
2 changed files with 3 additions and 6 deletions

View File

@ -187,7 +187,7 @@ namespace ams::kern {
static void InitializeLinearMemoryRegionTrees();
static size_t GetResourceRegionSizeForInit();
static size_t GetResourceRegionSizeForInit(bool use_extra_resource);
static MESOSPHERE_NOINLINE_IF_DEBUG auto GetKernelRegionExtents() { return GetVirtualMemoryRegionTree().GetDerivedRegionExtents(KMemoryRegionType_Kernel); }
static MESOSPHERE_NOINLINE_IF_DEBUG auto GetKernelCodeRegionExtents() { return GetVirtualMemoryRegionTree().GetDerivedRegionExtents(KMemoryRegionType_KernelCode); }

View File

@ -126,11 +126,8 @@ namespace ams::kern {
}
}
size_t KMemoryLayout::GetResourceRegionSizeForInit() {
/* Calculate resource region size based on whether we allow extra threads. */
const bool use_extra_resources = KSystemControl::Init::ShouldIncreaseThreadResourceLimit();
return KernelResourceSize + (use_extra_resources ? KernelSlabHeapAdditionalSize : 0);
size_t KMemoryLayout::GetResourceRegionSizeForInit(bool use_extra_resource) {
return KernelResourceSize + (use_extra_resource ? KernelSlabHeapAdditionalSize : 0);
}
}