From 9860bfb2cdb2a3f6093d936d647b1f254a23120d Mon Sep 17 00:00:00 2001 From: Mary Date: Mon, 26 Jun 2023 03:37:12 +0200 Subject: misc: memory: Migrate from OutOfMemoryException to SystemException entirely (#5399) Fix a regression with address space allocation while providing more information about the context of the exception. --- src/Ryujinx.Memory/MemoryManagementWindows.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Ryujinx.Memory/MemoryManagementWindows.cs') diff --git a/src/Ryujinx.Memory/MemoryManagementWindows.cs b/src/Ryujinx.Memory/MemoryManagementWindows.cs index d7d78bd8..aaed5a63 100644 --- a/src/Ryujinx.Memory/MemoryManagementWindows.cs +++ b/src/Ryujinx.Memory/MemoryManagementWindows.cs @@ -114,7 +114,7 @@ namespace Ryujinx.Memory if (handle == IntPtr.Zero) { - throw new OutOfMemoryException(); + throw new SystemException(Marshal.GetLastPInvokeErrorMessage()); } return handle; @@ -134,7 +134,7 @@ namespace Ryujinx.Memory if (ptr == IntPtr.Zero) { - throw new OutOfMemoryException(); + throw new SystemException(Marshal.GetLastPInvokeErrorMessage()); } return ptr; -- cgit v1.2.3