kern: add minimum alignment support to KMemoryManager

This commit is contained in:
Michael Scire
2024-10-09 21:36:49 -07:00
parent 12f7c95c5d
commit d78e450db6
7 changed files with 58 additions and 16 deletions

View File

@@ -924,7 +924,6 @@ namespace ams::kern {
MESOSPHERE_ABORT_UNLESS(m_main_thread_stack_size == 0);
/* Ensure that we're allocating a valid stack. */
stack_size = util::AlignUp(stack_size, PageSize);
R_UNLESS(stack_size + m_code_size <= m_max_process_memory, svc::ResultOutOfMemory());
R_UNLESS(stack_size + m_code_size >= m_code_size, svc::ResultOutOfMemory());