Skip to content

Commit

Permalink
pm: steal memory from 4.0.0+ ? applet : application
Browse files Browse the repository at this point in the history
  • Loading branch information
SciresM committed Oct 17, 2018
1 parent 5dc31f0 commit 06accd0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stratosphere/pm/source/pm_resource_limits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,12 @@ void ResourceLimitUtils::InitializeLimits() {
/* Atmosphere: Allocate extra memory (24 MiB) to SYSTEM away from Applet. */
for (unsigned int i = 0; i < 6; i++) {
g_memory_resource_limits[i][0] += ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES;
//g_memory_resource_limits[i][2] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES;
g_memory_resource_limits[i][1] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES;
/* On < 4.0.0, taking from application instead of applet fixes a rare hang on boot. */
if (kernelAbove400()) {
g_memory_resource_limits[i][2] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES;
} else {
g_memory_resource_limits[i][1] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES;
}
}

/* Set resource limits. */
Expand Down

0 comments on commit 06accd0

Please sign in to comment.