1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 13:52:21 +00:00

pm: account for 12.0.0 resource limit changes

This commit is contained in:
Michael Scire 2021-04-14 00:41:31 -07:00
parent bdcf02a3ef
commit 9e563d590b

View file

@ -36,6 +36,8 @@ namespace ams::pm::resource {
constexpr size_t ExtraSystemSessionCount600 = 100; constexpr size_t ExtraSystemSessionCount600 = 100;
constexpr size_t ReservedMemorySize600 = 5_MB; constexpr size_t ReservedMemorySize600 = 5_MB;
constexpr size_t ExtraSystemSessionCount920 = 33; constexpr size_t ExtraSystemSessionCount920 = 33;
constexpr size_t ExtraSystemEventCount1200 = 200;
constexpr size_t ExtraSystemSessionCount1200 = 200;
/* Atmosphere always allocates extra memory for system usage. */ /* Atmosphere always allocates extra memory for system usage. */
constexpr size_t ExtraSystemMemorySizeAtmosphere = 24_MB; constexpr size_t ExtraSystemMemorySizeAtmosphere = 24_MB;
@ -221,6 +223,11 @@ namespace ams::pm::resource {
/* 9.2.0 increased the system session limit. */ /* 9.2.0 increased the system session limit. */
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_SessionCountMax] += ExtraSystemSessionCount920; g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_SessionCountMax] += ExtraSystemSessionCount920;
} }
if (hos_version >= hos::Version_12_0_0) {
/* 12.0.0 increased the system event and session limits. */
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_EventCountMax] += ExtraSystemEventCount1200;
g_resource_limits[ResourceLimitGroup_System][svc::LimitableResource_SessionCountMax] += ExtraSystemSessionCount1200;
}
/* 7.0.0+: Calculate the number of extra application threads available. */ /* 7.0.0+: Calculate the number of extra application threads available. */
if (hos::GetVersion() >= hos::Version_7_0_0) { if (hos::GetVersion() >= hos::Version_7_0_0) {