Ejemplo n.º 1
0
void GCToEEInterface::GcEnumAllocContexts (enum_alloc_context_func* fn, void* param)
{
    Thread * pThread = NULL;
    while ((pThread = ThreadStore::GetThreadList(pThread)) != NULL)
    {
        fn(pThread->GetAllocContext(), param);
    }
}
Ejemplo n.º 2
0
void ThreadStore::AttachCurrentThread()
{
    // TODO: Locks

    Thread * pThread = new Thread();
    pThread->GetAllocContext()->init();
    pCurrentThread = pThread;

    pThread->m_pNext = g_pThreadList;
    g_pThreadList = pThread;
}
Ejemplo n.º 3
0
void CNameSpace::GcEnumAllocContexts (enum_alloc_context_func* fn)
{
    LIMITED_METHOD_CONTRACT;

    if (GCHeap::UseAllocationContexts())
    {
        Thread  *thread = NULL;
        while ((thread = ThreadStore::GetThreadList(thread)) != NULL)
        {
            (*fn) (thread->GetAllocContext());
        }
    }
}
Ejemplo n.º 4
0
void CNameSpace::GcFixAllocContexts (void* arg, void *heap)
{
    LIMITED_METHOD_CONTRACT;

    if (GCHeap::UseAllocationContexts())
    {
        Thread  *thread = NULL;
        while ((thread = ThreadStore::GetThreadList(thread)) != NULL)
        {
            GCHeap::GetGCHeap()->FixAllocContext(thread->GetAllocContext(), FALSE, arg, heap);
        }
    }
}
Ejemplo n.º 5
0
gc_alloc_context * GCToEEInterface::GetAllocContext()
{
    Thread* pThread = ::GetThread();
    return pThread->GetAllocContext();
}