From 091463a429c39969750e03a1b9cba04d7bd5a732 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 28 Dec 2021 00:18:41 -0800 Subject: 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. --- src/core/hle/kernel/svc_common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/hle/kernel/svc_common.h') diff --git a/src/core/hle/kernel/svc_common.h b/src/core/hle/kernel/svc_common.h index 60ea2c405..25de6e437 100644 --- a/src/core/hle/kernel/svc_common.h +++ b/src/core/hle/kernel/svc_common.h @@ -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 { -- cgit v1.2.3