mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-15 07:34:23 -04:00
kern: General system stability improvements to enhance the user's experience.
This commit is contained in:
parent
2ad9927a88
commit
583899ede3
5 changed files with 20 additions and 4 deletions
|
@ -105,6 +105,9 @@ namespace ams::kern {
|
|||
/* Clear our tracking variables. */
|
||||
this->system_resource_address = Null<KVirtualAddress>;
|
||||
this->system_resource_num_pages = 0;
|
||||
|
||||
/* Finalize optimized memory. If memory wasn't optimized, this is a no-op. */
|
||||
Kernel::GetMemoryManager().FinalizeOptimizedMemory(this->GetId(), this->memory_pool);
|
||||
}
|
||||
|
||||
/* Release memory to the resource limit. */
|
||||
|
@ -359,7 +362,7 @@ namespace ams::kern {
|
|||
MESOSPHERE_ABORT_UNLESS(this->process_id <= ProcessIdMax);
|
||||
|
||||
/* If we should optimize memory allocations, do so. */
|
||||
if (this->system_resource_address != Null<KVirtualAddress>) {
|
||||
if (this->system_resource_address != Null<KVirtualAddress> && (params.flags & ams::svc::CreateProcessFlag_OptimizeMemoryAllocation) != 0) {
|
||||
R_TRY(Kernel::GetMemoryManager().InitializeOptimizedMemory(this->process_id, pool));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue