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