2016-01-13 09:39:23 +00:00
|
|
|
#pragma once
|
2021-06-28 01:57:35 +00:00
|
|
|
#include <stddef.h>
|
2016-01-13 09:39:23 +00:00
|
|
|
|
|
|
|
enum MEM_PROTECTION
|
|
|
|
{
|
2017-08-20 22:48:31 +00:00
|
|
|
MEM_NOACCESS,
|
|
|
|
MEM_READONLY,
|
|
|
|
MEM_READWRITE,
|
|
|
|
MEM_EXECUTE_READWRITE,
|
2016-01-13 09:39:23 +00:00
|
|
|
};
|
|
|
|
|
2017-08-22 08:08:54 +00:00
|
|
|
void* AllocateAddressSpace(size_t size, void * base_address = 0);
|
2016-01-13 09:39:23 +00:00
|
|
|
bool FreeAddressSpace(void* addr, size_t size);
|
|
|
|
void* CommitMemory(void* addr, size_t size, MEM_PROTECTION memProtection);
|
|
|
|
bool DecommitMemory(void* addr, size_t size);
|
2021-04-12 09:41:28 +00:00
|
|
|
bool ProtectMemory(void* addr, size_t size, MEM_PROTECTION memProtection, MEM_PROTECTION * OldProtect = nullptr);
|