Fix mapping leaks caused by UnmapView not working on Linux (#3650)

* Add test for UnmapView mapping leaks

* Throw when UnmapView fails on Linux

* Fix UnmapView

* Remove throw
This commit is contained in:
gdkchan 2022-10-18 22:02:45 -03:00 committed by GitHub
parent 8d41402fa6
commit 7d26e4ac7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View file

@ -177,7 +177,7 @@ namespace Ryujinx.Memory
public static void UnmapView(IntPtr location, ulong size)
{
mmap(location, size, MmapProts.PROT_NONE, MmapFlags.MAP_FIXED, -1, 0);
mmap(location, size, MmapProts.PROT_NONE, MmapFlags.MAP_FIXED | MmapFlags.MAP_PRIVATE | MmapFlags.MAP_ANONYMOUS | MmapFlags.MAP_NORESERVE, -1, 0);
}
}
}