From 7a69f2f0623b2c7f557bc5576be446151c44a9b9 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Tue, 24 Jan 2023 19:54:28 -0700 Subject: [PATCH] kern/pm: only steal 8 MB from applet. WebApplet crashes on exit with 16 more MB stolen, apparently. --- .../source/board/nintendo/nx/kern_k_system_control.cpp | 2 +- stratosphere/pm/source/impl/pm_resource_manager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp index 009070b7d..3e71fbb17 100644 --- a/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp +++ b/libraries/libmesosphere/source/board/nintendo/nx/kern_k_system_control.cpp @@ -361,7 +361,7 @@ namespace ams::kern::board::nintendo::nx { }(); /* Return (possibly) adjusted size. */ - constexpr size_t ExtraSystemMemoryForAtmosphere = 56_MB; + constexpr size_t ExtraSystemMemoryForAtmosphere = 48_MB; return base_pool_size - ExtraSystemMemoryForAtmosphere - KTraceBufferSize; } diff --git a/stratosphere/pm/source/impl/pm_resource_manager.cpp b/stratosphere/pm/source/impl/pm_resource_manager.cpp index 0661affd9..644a8bb0e 100644 --- a/stratosphere/pm/source/impl/pm_resource_manager.cpp +++ b/stratosphere/pm/source/impl/pm_resource_manager.cpp @@ -33,7 +33,7 @@ namespace ams::pm::resource { constexpr size_t ReservedMemorySize600 = 5_MB; /* Atmosphere always allocates extra memory for system usage. */ - constexpr size_t ExtraSystemMemorySizeAtmosphere = 40_MB; + constexpr size_t ExtraSystemMemorySizeAtmosphere = 32_MB; /* Desired extra threads. */ constexpr u64 BaseApplicationThreads = 96;