191 size_t split, bool realloc); |
191 size_t split, bool realloc); |
192 static bool commit_memory(char* addr, size_t bytes); |
192 static bool commit_memory(char* addr, size_t bytes); |
193 static bool commit_memory(char* addr, size_t size, size_t alignment_hint); |
193 static bool commit_memory(char* addr, size_t size, size_t alignment_hint); |
194 static bool uncommit_memory(char* addr, size_t bytes); |
194 static bool uncommit_memory(char* addr, size_t bytes); |
195 static bool release_memory(char* addr, size_t bytes); |
195 static bool release_memory(char* addr, size_t bytes); |
196 static bool protect_memory(char* addr, size_t bytes); |
196 |
|
197 enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX }; |
|
198 static bool protect_memory(char* addr, size_t bytes, ProtType prot, |
|
199 bool is_committed = false); |
|
200 |
197 static bool guard_memory(char* addr, size_t bytes); |
201 static bool guard_memory(char* addr, size_t bytes); |
198 static bool unguard_memory(char* addr, size_t bytes); |
202 static bool unguard_memory(char* addr, size_t bytes); |
199 static char* map_memory(int fd, const char* file_name, size_t file_offset, |
203 static char* map_memory(int fd, const char* file_name, size_t file_offset, |
200 char *addr, size_t bytes, bool read_only = false, |
204 char *addr, size_t bytes, bool read_only = false, |
201 bool allow_exec = false); |
205 bool allow_exec = false); |