Skip to content

Commit

Permalink
[Android] Fix System.IO.MemoryMappedFiles tests (#81368)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrozsival committed Jan 31, 2023
1 parent 1c442fc commit 7c4b59c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ public abstract partial class MemoryMappedFilesTestBase : FileCleanupTestBase
int pageSize;
const int _SC_PAGESIZE_FreeBSD = 47;
const int _SC_PAGESIZE_Linux = 30;
const int _SC_PAGESIZE_Android = 39;
const int _SC_PAGESIZE_NetBSD = 28;
const int _SC_PAGESIZE_OSX = 29;
pageSize = sysconf(
OperatingSystem.IsMacOS() ? _SC_PAGESIZE_OSX :
OperatingSystem.IsFreeBSD() ? _SC_PAGESIZE_FreeBSD :
RuntimeInformation.IsOSPlatform(OSPlatform.Create("NETBSD")) ? _SC_PAGESIZE_NetBSD :
OperatingSystem.IsAndroid() ? _SC_PAGESIZE_Android :
_SC_PAGESIZE_Linux);
Assert.InRange(pageSize, 1, int.MaxValue);
return pageSize;
Expand Down

0 comments on commit 7c4b59c

Please sign in to comment.