From b4dc33efc2890bc0d60e99f715425d6af4a72b3d Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 24 Oct 2021 23:52:59 +0200 Subject: kernel: Clear pages allocated with SetHeapSize (#2776) * kernel: Clear pages allocated with SetHeapSize Before this commit, all new pages allocated by SetHeapSize were not cleared by the kernel. This would cause undefined data to be pass to the userland and possibly resulting in weird memory corruption. This commit also add support for custom fill heap and ipc value (that is also supported by the official kernel) * Remove dots at the end of KPageTableBase.MapPages new documentation * Remove unused _stackFillValue --- Ryujinx.HLE/HOS/Kernel/Memory/MemoryFillValue.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Ryujinx.HLE/HOS/Kernel/Memory/MemoryFillValue.cs (limited to 'Ryujinx.HLE/HOS/Kernel/Memory/MemoryFillValue.cs') diff --git a/Ryujinx.HLE/HOS/Kernel/Memory/MemoryFillValue.cs b/Ryujinx.HLE/HOS/Kernel/Memory/MemoryFillValue.cs new file mode 100644 index 00000000..cdc892fc --- /dev/null +++ b/Ryujinx.HLE/HOS/Kernel/Memory/MemoryFillValue.cs @@ -0,0 +1,10 @@ +namespace Ryujinx.HLE.HOS.Kernel.Memory +{ + enum MemoryFillValue : byte + { + Zero = 0, + Stack = 0x58, + Ipc = 0x59, + Heap = 0x5A, + } +} -- cgit v1.2.3