UnixPageAllocator.cs 612 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using MonoMod.Utils;
  4. namespace BepInEx.IL2CPP.Allocator
  5. {
  6. /// <summary>
  7. /// Based on https://github.com/kubo/funchook
  8. /// </summary>
  9. internal abstract class UnixPageAllocator : PageAllocator
  10. {
  11. protected abstract IMemoryMapper OpenMemoryMap();
  12. public override IntPtr Allocate(IntPtr hint)
  13. {
  14. throw new NotImplementedException();
  15. }
  16. public override void Free(IntPtr page)
  17. {
  18. throw new NotImplementedException();
  19. }
  20. protected interface IMemoryMapper: IDisposable
  21. {
  22. bool FindNextFree(ref IntPtr start, ref ulong size);
  23. }
  24. }
  25. }