From b402b4e7f6463c42ac5afcfaee45592e75851dc3 Mon Sep 17 00:00:00 2001
From: gnisman <gleb.nisman@gmail.com>
Date: Sat, 14 Jan 2023 20:37:04 +0200
Subject: [PATCH] Change GetPageSize to use Environment.SystemPageSize (#4291)

* Change GetPageSize to use Environment.SystemPageSize

* Fix PR comment
---
 Ryujinx.Memory/MemoryBlock.cs | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/Ryujinx.Memory/MemoryBlock.cs b/Ryujinx.Memory/MemoryBlock.cs
index e1f19c27a8..2df7ea9bd0 100644
--- a/Ryujinx.Memory/MemoryBlock.cs
+++ b/Ryujinx.Memory/MemoryBlock.cs
@@ -435,12 +435,7 @@ namespace Ryujinx.Memory
 
         public static ulong GetPageSize()
         {
-            if (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
-            {
-                return 1UL << 14;
-            }
-
-            return 1UL << 12;
+            return (ulong)Environment.SystemPageSize;
         }
 
         private static void ThrowInvalidMemoryRegionException() => throw new InvalidMemoryRegionException();