|
@@ -30,11 +30,6 @@ namespace BepInEx.IL2CPP.Allocator
|
|
public const int KERN_SUCCESS = 0;
|
|
public const int KERN_SUCCESS = 0;
|
|
public static readonly IntPtr TaskSelf;
|
|
public static readonly IntPtr TaskSelf;
|
|
|
|
|
|
- [DynDllImport("libSystem")]
|
|
|
|
- public static vm_region_64Delegate vm_region_64;
|
|
|
|
-
|
|
|
|
- public delegate int vm_region_64Delegate(IntPtr target_task, ref IntPtr address, ref IntPtr size, int flavor, ref vm_region_basic_info_64 info, ref uint infoCnt, ref uint object_name);
|
|
|
|
-
|
|
|
|
static LibSystem()
|
|
static LibSystem()
|
|
{
|
|
{
|
|
typeof(LibSystem).ResolveDynDllImports(new Dictionary<string, List<DynDllMapping>>
|
|
typeof(LibSystem).ResolveDynDllImports(new Dictionary<string, List<DynDllMapping>>
|
|
@@ -49,8 +44,9 @@ namespace BepInEx.IL2CPP.Allocator
|
|
TaskSelf = libsystem.GetFunction("mach_task_self_"); // This isn't a function but rather an exported symbol
|
|
TaskSelf = libsystem.GetFunction("mach_task_self_"); // This isn't a function but rather an exported symbol
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // ReSharper disable InconsistentNaming
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
- public struct vm_region_basic_info_64
|
|
|
|
|
|
+ public readonly struct vm_region_basic_info_64
|
|
{
|
|
{
|
|
public readonly int protection;
|
|
public readonly int protection;
|
|
public readonly int max_protection;
|
|
public readonly int max_protection;
|
|
@@ -66,6 +62,14 @@ namespace BepInEx.IL2CPP.Allocator
|
|
public readonly int behavior;
|
|
public readonly int behavior;
|
|
public readonly ushort user_wired_count;
|
|
public readonly ushort user_wired_count;
|
|
}
|
|
}
|
|
|
|
+ // ReSharper restore InconsistentNaming
|
|
|
|
+
|
|
|
|
+ // ReSharper disable InconsistentNaming
|
|
|
|
+ [DynDllImport("libSystem")]
|
|
|
|
+ public static vm_region_64Delegate vm_region_64;
|
|
|
|
+
|
|
|
|
+ public delegate int vm_region_64Delegate(IntPtr target_task, ref IntPtr address, ref IntPtr size, int flavor, ref vm_region_basic_info_64 info, ref uint infoCnt, ref uint object_name);
|
|
|
|
+ // ReSharper restore InconsistentNaming
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|