35d91a0e58
* memory: Check results of pinvoke calls * Increase vm.max_map_count when running Ryujinx * Add SupportedOSPlatform attribute for WindowsApiException * Revert increasing vm.max_map_count via script * Add LinuxHelper to detect and increase vm.max_map_count With GUI dialogs, this should be a bit more user-friendly. * Supply arguments as a list to RunPkExec * Add error logging in case RunPkExec() fails * Prevent Gtk from crashing
24 lines
632 B
C#
24 lines
632 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Ryujinx.Memory
|
|
{
|
|
class MemoryProtectionException : Exception
|
|
{
|
|
public MemoryProtectionException()
|
|
{
|
|
}
|
|
|
|
public MemoryProtectionException(MemoryPermission permission) : base($"Failed to set memory protection to \"{permission}\": {Marshal.GetLastPInvokeErrorMessage()}")
|
|
{
|
|
}
|
|
|
|
public MemoryProtectionException(string message) : base(message)
|
|
{
|
|
}
|
|
|
|
public MemoryProtectionException(string message, Exception innerException) : base(message, innerException)
|
|
{
|
|
}
|
|
}
|
|
}
|