summaryrefslogtreecommitdiff
path: root/src/gc/sample/GCSample.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gc/sample/GCSample.cpp')
-rw-r--r--src/gc/sample/GCSample.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gc/sample/GCSample.cpp b/src/gc/sample/GCSample.cpp
index 664dc38e94..112d291420 100644
--- a/src/gc/sample/GCSample.cpp
+++ b/src/gc/sample/GCSample.cpp
@@ -94,14 +94,11 @@ inline void ErectWriteBarrier(Object ** dst, Object * ref)
if (((uint8_t*)dst < g_gc_lowest_address) || ((uint8_t*)dst >= g_gc_highest_address))
return;
- 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_gc_card_table) + card_byte((uint8_t *)dst);
- if(*pCardByte != 0xFF)
- *pCardByte = 0xFF;
- }
+ // 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_gc_card_table) + card_byte((uint8_t *)dst);
+ if(*pCardByte != 0xFF)
+ *pCardByte = 0xFF;
}
void WriteBarrier(Object ** dst, Object * ref)