[Base] Use enum instead of define for X_MEM_*

This commit is contained in:
Gliniak 2020-08-27 13:22:47 +02:00 committed by Triang3l
parent 4f5c313fe3
commit 4908754d84
1 changed files with 14 additions and 12 deletions

View File

@ -118,18 +118,20 @@ typedef uint32_t X_HRESULT;
#define X_E_NO_SUCH_USER X_HRESULT_FROM_WIN32(X_ERROR_NO_SUCH_USER) #define X_E_NO_SUCH_USER X_HRESULT_FROM_WIN32(X_ERROR_NO_SUCH_USER)
// MEM_*, used by NtAllocateVirtualMemory // MEM_*, used by NtAllocateVirtualMemory
#define X_MEM_COMMIT 0x00001000 enum X_MEM : uint32_t {
#define X_MEM_RESERVE 0x00002000 X_MEM_COMMIT = 0x00001000,
#define X_MEM_DECOMMIT 0x00004000 X_MEM_RESERVE = 0x00002000,
#define X_MEM_RELEASE 0x00008000 X_MEM_DECOMMIT = 0x00004000,
#define X_MEM_FREE 0x00010000 X_MEM_RELEASE = 0x00008000,
#define X_MEM_PRIVATE 0x00020000 X_MEM_FREE = 0x00010000,
#define X_MEM_RESET 0x00080000 X_MEM_PRIVATE = 0x00020000,
#define X_MEM_TOP_DOWN 0x00100000 X_MEM_RESET = 0x00080000,
#define X_MEM_NOZERO 0x00800000 X_MEM_TOP_DOWN = 0x00100000,
#define X_MEM_LARGE_PAGES 0x20000000 X_MEM_NOZERO = 0x00800000,
#define X_MEM_HEAP 0x40000000 X_MEM_LARGE_PAGES = 0x20000000,
#define X_MEM_16MB_PAGES 0x80000000 // from Valve SDK X_MEM_HEAP = 0x40000000,
X_MEM_16MB_PAGES = 0x80000000 // from Valve SDK
};
// PAGE_*, used by NtAllocateVirtualMemory // PAGE_*, used by NtAllocateVirtualMemory
#define X_PAGE_NOACCESS 0x00000001 #define X_PAGE_NOACCESS 0x00000001