diff options
Diffstat (limited to 'src/gc/sample/GCSample.cpp')
-rw-r--r-- | src/gc/sample/GCSample.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gc/sample/GCSample.cpp b/src/gc/sample/GCSample.cpp index 7e07834ced..664dc38e94 100644 --- a/src/gc/sample/GCSample.cpp +++ b/src/gc/sample/GCSample.cpp @@ -68,7 +68,7 @@ Object * AllocateObject(MethodTable * pMT) } else { - pObject = GCHeap::GetGCHeap()->Alloc(acontext, size, 0); + pObject = g_theGCHeap->Alloc(acontext, size, 0); if (pObject == NULL) return NULL; } @@ -91,14 +91,14 @@ inline void ErectWriteBarrier(Object ** dst, Object * ref) { // if the dst is outside of the heap (unboxed value classes) then we // simply exit - if (((uint8_t*)dst < g_lowest_address) || ((uint8_t*)dst >= g_highest_address)) + if (((uint8_t*)dst < g_gc_lowest_address) || ((uint8_t*)dst >= g_gc_highest_address)) return; - if((uint8_t*)ref >= g_ephemeral_low && (uint8_t*)ref < g_ephemeral_high) + if((uint8_t*)ref >= g_gc_ephemeral_low && (uint8_t*)ref < g_gc_ephemeral_high) { // volatile is used here to prevent fetch of g_card_table from being reordered // with g_lowest/highest_address check above. See comment in code:gc_heap::grow_brick_card_tables. - uint8_t* pCardByte = (uint8_t *)*(volatile uint8_t **)(&g_card_table) + card_byte((uint8_t *)dst); + uint8_t* pCardByte = (uint8_t *)*(volatile uint8_t **)(&g_gc_card_table) + card_byte((uint8_t *)dst); if(*pCardByte != 0xFF) *pCardByte = 0xFF; } @@ -137,7 +137,7 @@ int __cdecl main(int argc, char* argv[]) // // Initialize GC heap // - GCHeap *pGCHeap = GCHeap::CreateGCHeap(); + IGCHeap *pGCHeap = InitializeGarbageCollector(nullptr); if (!pGCHeap) return -1; |