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.
This commit is contained in:
Mary 2023-06-26 03:37:12 +02:00 committed by GitHub
parent f6ada8d169
commit 9860bfb2cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View file

@ -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;