summaryrefslogtreecommitdiff
path: root/src/vm/dynamicmethod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/dynamicmethod.cpp')
-rw-r--r--src/vm/dynamicmethod.cpp25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/vm/dynamicmethod.cpp b/src/vm/dynamicmethod.cpp
index 3eec125247..2a61f97afd 100644
--- a/src/vm/dynamicmethod.cpp
+++ b/src/vm/dynamicmethod.cpp
@@ -917,7 +917,7 @@ void LCGMethodResolver::Reset()
m_DynamicStringLiterals = NULL;
m_recordCodePointer = NULL;
m_UsedIndCellList = NULL;
- m_jumpStubBlock = NULL;
+ m_pJumpStubCache = NULL;
m_next = NULL;
m_Code = NULL;
}
@@ -1035,19 +1035,24 @@ void LCGMethodResolver::Destroy(BOOL fDomainUnload)
m_recordCodePointer = NULL;
}
- JumpStubBlockHeader* current = m_jumpStubBlock;
- JumpStubBlockHeader* next;
- while (current)
+ if (m_pJumpStubCache != NULL)
{
- next = current->m_next;
+ JumpStubBlockHeader* current = m_pJumpStubCache->m_pBlocks;
+ while (current)
+ {
+ JumpStubBlockHeader* next = current->m_next;
+
+ HostCodeHeap *pHeap = current->GetHostCodeHeap();
+ LOG((LF_BCL, LL_INFO1000, "Level3 - Resolver {0x%p} - Release reference to heap {%p, vt(0x%x)} \n", current, pHeap, *(size_t*)pHeap));
+ pHeap->m_pJitManager->FreeCodeMemory(pHeap, current);
- HostCodeHeap *pHeap = current->GetHostCodeHeap();
- LOG((LF_BCL, LL_INFO1000, "Level3 - Resolver {0x%p} - Release reference to heap {%p, vt(0x%x)} \n", current, pHeap, *(size_t*)pHeap));
- pHeap->m_pJitManager->FreeCodeMemory(pHeap, current);
+ current = next;
+ }
+ m_pJumpStubCache->m_pBlocks = NULL;
- current = next;
+ delete m_pJumpStubCache;
+ m_pJumpStubCache = NULL;
}
- m_jumpStubBlock = NULL;
if (m_managedResolver)
{