vm_native.cpp: implement shm::try_map

Treats addr as a hint, emulating windows behaviour.
This commit is contained in:
Nekotekina 2021-01-25 16:55:19 +03:00
parent 486d48e4f8
commit caa83d20f7
2 changed files with 25 additions and 3 deletions

View file

@ -67,6 +67,9 @@ namespace utils
// Map shared memory
u8* map(void* ptr, protection prot = protection::rw) const;
// Attempt to map shared memory fix fixed pointer
u8* try_map(void* ptr, protection prot = protection::rw) const;
// Map shared memory over reserved memory region, which is unsafe (non-atomic) under Win32
u8* map_critical(void* ptr, protection prot = protection::rw);