1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-23 04:12:02 +00:00

kern: Fix bug when reducing heap size

This commit is contained in:
Michael Scire 2020-07-23 04:16:00 -07:00 committed by SciresM
parent 1d4d637818
commit 240e6227e9

View file

@ -1181,7 +1181,7 @@ namespace ams::kern {
KScopedPageTableUpdater updater(this);
/* Validate memory state. */
R_TRY(this->CheckMemoryState(this->heap_region_start + size, (this->heap_region_end - this->heap_region_start) - size,
R_TRY(this->CheckMemoryState(this->heap_region_start + size, (this->current_heap_end - this->heap_region_start) - size,
KMemoryState_All, KMemoryState_Normal,
KMemoryPermission_All, KMemoryPermission_UserReadWrite,
KMemoryAttribute_All, KMemoryAttribute_None));