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

This commit is contained in:
Michael Scire authored and SciresM committed 2022-10-12 09:15:16 -07:00
1 parent 7f2cbba543
commit ea82889e6c
4 files changed
+14 -14

No files matched your search

@@ -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); }
@@ -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);
}
}