vm_native: document some unmap_critical behaviour (posix)

This commit is contained in:
Nekotekina 2021-04-18 13:12:29 +03:00
parent c061991c43
commit 7a9561b966
2 changed files with 5 additions and 0 deletions

View File

@ -923,7 +923,9 @@ namespace vm
else
{
shm->unmap_critical(g_base_addr + addr);
#ifdef _WIN32
shm->unmap_critical(g_sudo_addr + addr);
#endif
}
if (is_exec)
@ -1148,7 +1150,9 @@ namespace vm
if (m_common)
{
m_common->unmap_critical(vm::base(addr));
#ifdef _WIN32
m_common->unmap_critical(vm::get_super_ptr(addr));
#endif
}
}
}

View File

@ -511,6 +511,7 @@ namespace utils
return;
}
#else
// This method is faster but leaves mapped remnants of the shm (until overwritten)
ensure(::mprotect(target, m_size, PROT_NONE) != -1);
#endif
}