summaryrefslogtreecommitdiff
path: root/src/vm/hosting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/hosting.cpp')
-rw-r--r--src/vm/hosting.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vm/hosting.cpp b/src/vm/hosting.cpp
index 620b9d6800..d47bc28238 100644
--- a/src/vm/hosting.cpp
+++ b/src/vm/hosting.cpp
@@ -444,6 +444,11 @@ LPVOID EEHeapAllocInProcessHeap(DWORD dwFlags, SIZE_T dwBytes)
WRAPPER_NO_CONTRACT;
STATIC_CONTRACT_SO_TOLERANT;
+#ifdef _DEBUG
+ // Check whether (indispensable) implicit casting in ClrAllocInProcessHeapBootstrap is safe.
+ static FastAllocInProcessHeapFunc pFunc = EEHeapAllocInProcessHeap;
+#endif
+
static HANDLE ProcessHeap = NULL;
// We need to guarentee a very small stack consumption in allocating. And we can't allow
@@ -506,6 +511,11 @@ BOOL EEHeapFreeInProcessHeap(DWORD dwFlags, LPVOID lpMem)
}
CONTRACTL_END;
+#ifdef _DEBUG
+ // Check whether (indispensable) implicit casting in ClrFreeInProcessHeapBootstrap is safe.
+ static FastFreeInProcessHeapFunc pFunc = EEHeapFreeInProcessHeap;
+#endif
+
// Take a look at comment in EEHeapFree and EEHeapAllocInProcessHeap, obviously someone
// needs to take a little time to think more about this code.
//CONTRACT_VIOLATION(SOToleranceViolation);