mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-26 22:02:15 +00:00
pm: steal memory from 4.0.0+ ? applet : application
This commit is contained in:
parent
5dc31f001e
commit
06accd00f9
1 changed files with 6 additions and 2 deletions
|
@ -182,9 +182,13 @@ void ResourceLimitUtils::InitializeLimits() {
|
||||||
/* Atmosphere: Allocate extra memory (24 MiB) to SYSTEM away from Applet. */
|
/* Atmosphere: Allocate extra memory (24 MiB) to SYSTEM away from Applet. */
|
||||||
for (unsigned int i = 0; i < 6; i++) {
|
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][0] += ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES;
|
||||||
//g_memory_resource_limits[i][2] -= 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;
|
g_memory_resource_limits[i][1] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Set resource limits. */
|
/* Set resource limits. */
|
||||||
for (unsigned int i = 0; i < 3; i++) {
|
for (unsigned int i = 0; i < 3; i++) {
|
||||||
|
|
Loading…
Reference in a new issue