Use different approach in shm::unmap_critical (Linux)

For now, set protection to PROT_NONE.
Attempt to address #9609
This commit is contained in:
Nekotekina 2021-01-15 19:56:05 +03:00
parent b5837d1271
commit 4ed76a15ff

View File

@ -461,7 +461,7 @@ namespace utils
return;
}
#else
::mmap(reinterpret_cast<void*>(target), m_size, PROT_NONE, MAP_FIXED | MAP_ANON | MAP_PRIVATE | c_map_noreserve, -1, 0);
ensure(::mprotect(target, m_size, PROT_NONE) != -1);
#endif
}