summaryrefslogtreecommitdiff
path: root/src/vm/gchelpers.cpp
diff options
context:
space:
mode:
authorDavid Mason <davmason@microsoft.com>2018-08-11 10:11:49 -0700
committerGitHub <noreply@github.com>2018-08-11 10:11:49 -0700
commitd4738d1e9e9b50d00023eb4caca225812cabe285 (patch)
tree4274bf312dd1e42730411c9a1c3ab3a2edcebacd /src/vm/gchelpers.cpp
parentaf4ec7c89d0192ad14392da04e8c097da8ec9e48 (diff)
downloadcoreclr-d4738d1e9e9b50d00023eb4caca225812cabe285.tar.gz
coreclr-d4738d1e9e9b50d00023eb4caca225812cabe285.tar.bz2
coreclr-d4738d1e9e9b50d00023eb4caca225812cabe285.zip
[local gc] disable feature redhawk (#17769)
Diffstat (limited to 'src/vm/gchelpers.cpp')
-rw-r--r--src/vm/gchelpers.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/vm/gchelpers.cpp b/src/vm/gchelpers.cpp
index 4684edeaf5..b4f018f87d 100644
--- a/src/vm/gchelpers.cpp
+++ b/src/vm/gchelpers.cpp
@@ -238,12 +238,16 @@ inline Object* Alloc(size_t size, BOOL bFinalize, BOOL bContainsPointers )
INTERIOR_STACK_PROBE_FOR(GetThread(), static_cast<unsigned>(DEFAULT_ENTRY_PROBE_AMOUNT * 1.5));
if (GCHeapUtilities::UseThreadAllocationContexts())
{
- retVal = GCHeapUtilities::GetGCHeap()->Alloc(GetThreadAllocContext(), size, flags);
+ gc_alloc_context *threadContext = GetThreadAllocContext();
+ GCStress<gc_on_alloc>::MaybeTrigger(threadContext);
+ retVal = GCHeapUtilities::GetGCHeap()->Alloc(threadContext, size, flags);
}
else
{
GlobalAllocLockHolder holder(&g_global_alloc_lock);
- retVal = GCHeapUtilities::GetGCHeap()->Alloc(&g_global_alloc_context, size, flags);
+ gc_alloc_context *globalContext = &g_global_alloc_context;
+ GCStress<gc_on_alloc>::MaybeTrigger(globalContext);
+ retVal = GCHeapUtilities::GetGCHeap()->Alloc(globalContext, size, flags);
}
@@ -279,12 +283,16 @@ inline Object* AllocAlign8(size_t size, BOOL bFinalize, BOOL bContainsPointers,
INTERIOR_STACK_PROBE_FOR(GetThread(), static_cast<unsigned>(DEFAULT_ENTRY_PROBE_AMOUNT * 1.5));
if (GCHeapUtilities::UseThreadAllocationContexts())
{
- retVal = GCHeapUtilities::GetGCHeap()->AllocAlign8(GetThreadAllocContext(), size, flags);
+ gc_alloc_context *threadContext = GetThreadAllocContext();
+ GCStress<gc_on_alloc>::MaybeTrigger(threadContext);
+ retVal = GCHeapUtilities::GetGCHeap()->AllocAlign8(threadContext, size, flags);
}
else
{
GlobalAllocLockHolder holder(&g_global_alloc_lock);
- retVal = GCHeapUtilities::GetGCHeap()->AllocAlign8(&g_global_alloc_context, size, flags);
+ gc_alloc_context *globalContext = &g_global_alloc_context;
+ GCStress<gc_on_alloc>::MaybeTrigger(globalContext);
+ retVal = GCHeapUtilities::GetGCHeap()->AllocAlign8(globalContext, size, flags);
}
if (!retVal)