summaryrefslogtreecommitdiff
path: root/src/vm/gcenv.os.cpp
diff options
context:
space:
mode:
authorSean Gillespie <sean@swgillespie.me>2016-11-16 09:34:57 -0800
committerGitHub <noreply@github.com>2016-11-16 09:34:57 -0800
commitbb9f30e4658342f83bb3b5639ae24ec92e0a1d2a (patch)
treee2d7e09a74aac2bfead1315fc64e2515ba057145 /src/vm/gcenv.os.cpp
parent2c0a2c05ba82460a8d8a4b1e2d98e908e59d5d54 (diff)
downloadcoreclr-bb9f30e4658342f83bb3b5639ae24ec92e0a1d2a.tar.gz
coreclr-bb9f30e4658342f83bb3b5639ae24ec92e0a1d2a.tar.bz2
coreclr-bb9f30e4658342f83bb3b5639ae24ec92e0a1d2a.zip
Enable GCToOSInterface to be defined on the GC side of the GC interface (#8121)
* Re-introduce changes lost in a merge conflict * Enable GCToOSInterface to be defined behind the GC interface when building the GC in standalone mode. Provide a skeleton Windows implementation and the framework for a Unix implementation. * Address code review feedback
Diffstat (limited to 'src/vm/gcenv.os.cpp')
-rw-r--r--src/vm/gcenv.os.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vm/gcenv.os.cpp b/src/vm/gcenv.os.cpp
index 30b72cbba1..896dce6e40 100644
--- a/src/vm/gcenv.os.cpp
+++ b/src/vm/gcenv.os.cpp
@@ -18,6 +18,12 @@
#include <Psapi.h>
#endif
+#ifdef Sleep
+#undef Sleep
+#endif // Sleep
+
+#include "env/gcenv.os.h"
+
#define MAX_PTR ((uint8_t*)(~(ptrdiff_t)0))
// Initialize the interface implementation
@@ -160,7 +166,7 @@ void GCToOSInterface::YieldThread(uint32_t switchCount)
// flags - flags to control special settings like write watching
// Return:
// Starting virtual address of the reserved range
-void* GCToOSInterface::VirtualReserve(void* address, size_t size, size_t alignment, uint32_t flags)
+void* GCToOSInterface::VirtualReserve(size_t size, size_t alignment, uint32_t flags)
{
LIMITED_METHOD_CONTRACT;
@@ -249,7 +255,7 @@ bool GCToOSInterface::SupportsWriteWatch()
// check if the OS supports write-watch.
// Drawbridge does not support write-watch so we still need to do the runtime detection for them.
// Otherwise, all currently supported OSes do support write-watch.
- void* mem = VirtualReserve (0, g_SystemInfo.dwAllocationGranularity, 0, VirtualReserveFlags::WriteWatch);
+ void* mem = VirtualReserve (g_SystemInfo.dwAllocationGranularity, 0, VirtualReserveFlags::WriteWatch);
if (mem != NULL)
{
VirtualRelease (mem, g_SystemInfo.dwAllocationGranularity);