core: hle: kernel: Updated implementation of svcSetHeapSize.

- Updates our svcSetHeapSize with latest HOS, furthermore allowing heap size to properly be extended/shrunk.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_set_heap_size.cpp.
This commit is contained in:
bunnei
2021-12-28 00:18:41 -08:00
parent 9a0648ff0a
commit 091463a429
6 changed files with 138 additions and 80 deletions

View File

@ -5,6 +5,7 @@
#pragma once
#include "common/common_types.h"
#include "common/literals.h"
namespace Kernel {
using Handle = u32;
@ -12,9 +13,13 @@ using Handle = u32;
namespace Kernel::Svc {
using namespace Common::Literals;
constexpr s32 ArgumentHandleCountMax = 0x40;
constexpr u32 HandleWaitMask{1u << 30};
constexpr inline std::size_t HeapSizeAlignment = 2_MiB;
constexpr inline Handle InvalidHandle = Handle(0);
enum PseudoHandle : Handle {