Write more memory mapping tests
Microsoft claims to support COW but it's probably not true.
This commit is contained in:
@ -28,14 +28,14 @@
|
||||
* bypassed by calling this function. However the caller is responsible
|
||||
* for passing the magic memory handle on Windows NT to CloseHandle().
|
||||
*/
|
||||
noasan struct DirectMap __mmap(void *addr, size_t size, unsigned prot,
|
||||
unsigned flags, int fd, int64_t off) {
|
||||
noasan struct DirectMap __mmap(void *addr, size_t size, int prot, int flags,
|
||||
int fd, int64_t off) {
|
||||
if (!IsWindows()) {
|
||||
return (struct DirectMap){sys_mmap(addr, size, prot, flags, fd, off),
|
||||
kNtInvalidHandleValue};
|
||||
} else {
|
||||
return __sys_mmap_nt(addr, size, prot,
|
||||
fd != -1 ? g_fds.p[fd].handle : kNtInvalidHandleValue,
|
||||
off);
|
||||
return sys_mmap_nt(addr, size, prot, flags,
|
||||
fd != -1 ? g_fds.p[fd].handle : kNtInvalidHandleValue,
|
||||
off);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user