Implement utils::memory_reset

This commit is contained in:
Nekotekina 2018-09-22 23:14:28 +03:00
parent a605dd0a3f
commit bb524db236
2 changed files with 16 additions and 5 deletions

View file

@ -25,11 +25,12 @@ namespace utils
*/
void memory_commit(void* pointer, std::size_t size, protection prot = protection::rw);
/**
* Decommit all memory committed via commit_page_memory.
*/
// Decommit all memory committed via commit_page_memory.
void memory_decommit(void* pointer, std::size_t size);
// Decommit all memory and commit it again.
void memory_reset(void* pointer, std::size_t size, protection prot = protection::rw);
// Free memory after reserved by memory_reserve, should specify original size
void memory_release(void* pointer, std::size_t size);