MemoryPermission.cs
1 using System; 2 3 namespace Ryujinx.Memory 4 { 5 /// <summary> 6 /// Memory access permission control. 7 /// </summary> 8 [Flags] 9 public enum MemoryPermission 10 { 11 /// <summary> 12 /// No access is allowed on the memory region. 13 /// </summary> 14 None = 0, 15 16 /// <summary> 17 /// Allow reads on the memory region. 18 /// </summary> 19 Read = 1 << 0, 20 21 /// <summary> 22 /// Allow writes on the memory region. 23 /// </summary> 24 Write = 1 << 1, 25 26 /// <summary> 27 /// Allow code execution on the memory region. 28 /// </summary> 29 Execute = 1 << 2, 30 31 /// <summary> 32 /// Allow reads and writes on the memory region. 33 /// </summary> 34 ReadAndWrite = Read | Write, 35 36 /// <summary> 37 /// Allow reads and code execution on the memory region. 38 /// </summary> 39 ReadAndExecute = Read | Execute, 40 41 /// <summary> 42 /// Allow reads, writes, and code execution on the memory region. 43 /// </summary> 44 ReadWriteExecute = Read | Write | Execute, 45 46 /// <summary> 47 /// Indicates an invalid protection. 48 /// </summary> 49 Invalid = 255, 50 } 51 }