Write more memory mapping tests

Microsoft claims to support COW but it's probably not true.
This commit is contained in:
Justine Tunney 2021-02-04 18:24:33 -08:00
parent 74d48f7cb6
commit 2fdc19e7a7
6 changed files with 83 additions and 29 deletions

View file

@ -97,7 +97,9 @@ textwindows noasan void WinMainForked(void) {
size = ((uint64_t)(_mmi.p[i].y - _mmi.p[i].x) << 16) + FRAMESIZE;
if (_mmi.p[i].flags & MAP_PRIVATE) {
CloseHandle(_mmi.p[i].h);
_mmi.p[i].h = __sys_mmap_nt(addr, size, _mmi.p[i].prot, -1, 0).maphandle;
_mmi.p[i].h =
sys_mmap_nt(addr, size, _mmi.p[i].prot, _mmi.p[i].flags, -1, 0)
.maphandle;
ReadAll(reader, addr, size);
} else {
MapViewOfFileExNuma(