MemoryAllocationFlags.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. namespace Ryujinx.Memory
  3. {
  4. /// <summary>
  5. /// Flags that controls allocation and other properties of the memory block memory.
  6. /// </summary>
  7. [Flags]
  8. public enum MemoryAllocationFlags
  9. {
  10. /// <summary>
  11. /// No special allocation settings.
  12. /// </summary>
  13. None = 0,
  14. /// <summary>
  15. /// Reserve a region of memory on the process address space,
  16. /// without actually allocation any backing memory.
  17. /// </summary>
  18. Reserve = 1 << 0,
  19. /// <summary>
  20. /// Enables read and write tracking of the memory block.
  21. /// This currently does nothing and is reserved for future use.
  22. /// </summary>
  23. Tracked = 1 << 1,
  24. /// <summary>
  25. /// Enables mirroring of the memory block through aliasing of memory pages.
  26. /// When enabled, this allows creating more memory blocks sharing the same backing storage.
  27. /// </summary>
  28. Mirrorable = 1 << 2,
  29. /// <summary>
  30. /// Indicates that the memory block should support mapping views of a mirrorable memory block.
  31. /// The block that is to have their views mapped should be created with the <see cref="Mirrorable"/> flag.
  32. /// </summary>
  33. ViewCompatible = 1 << 3,
  34. /// <summary>
  35. /// If used with the <see cref="Mirrorable"/> flag, indicates that the memory block will only be used as
  36. /// backing storage and will never be accessed directly, so the memory for the block will not be mapped.
  37. /// </summary>
  38. NoMap = 1 << 4,
  39. /// <summary>
  40. /// Indicates that the memory will be used to store JIT generated code.
  41. /// On some platforms, this requires special flags to be passed that will allow the memory to be executable.
  42. /// </summary>
  43. Jit = 1 << 5
  44. }
  45. }