summaryrefslogtreecommitdiff
path: root/src/vm/gcenv.os.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/gcenv.os.cpp')
-rw-r--r--src/vm/gcenv.os.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/vm/gcenv.os.cpp b/src/vm/gcenv.os.cpp
index abacc3c76d..8572551a06 100644
--- a/src/vm/gcenv.os.cpp
+++ b/src/vm/gcenv.os.cpp
@@ -26,12 +26,22 @@
#define MAX_PTR ((uint8_t*)(~(ptrdiff_t)0))
+#ifdef FEATURE_PAL
+uint32_t g_pageSizeUnixInl = 0;
+#endif
+
+
// Initialize the interface implementation
// Return:
// true if it has succeeded, false if it has failed
bool GCToOSInterface::Initialize()
{
LIMITED_METHOD_CONTRACT;
+
+#ifdef FEATURE_PAL
+ g_pageSizeUnixInl = GetOsPageSize();
+#endif
+
return true;
}
@@ -299,7 +309,7 @@ bool GCToOSInterface::GetWriteWatch(bool resetState, void* address, size_t size,
ULONG granularity;
bool success = ::GetWriteWatch(flags, address, size, pageAddresses, (ULONG_PTR*)pageAddressesCount, &granularity) == 0;
- _ASSERTE (granularity == OS_PAGE_SIZE);
+ _ASSERTE (granularity == GetOsPageSize());
return success;
}