This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Expand file tree Collapse file tree 2 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -6594,19 +6594,13 @@ void gc_heap::set_brick (size_t index, ptrdiff_t val)
6594
6594
}
6595
6595
6596
6596
inline
6597
- int gc_heap::brick_entry (size_t index)
6597
+ int gc_heap::get_brick_entry (size_t index)
6598
6598
{
6599
- int val = brick_table [index];
6600
- if (val == 0)
6601
- {
6602
- return -32768;
6603
- }
6604
- else if (val < 0)
6605
- {
6606
- return val;
6607
- }
6608
- else
6609
- return val-1;
6599
+ #ifdef MULTIPLE_HEAPS
6600
+ return VolatileLoadWithoutBarrier(&brick_table [index]);
6601
+ #else
6602
+ return brick_table[index];
6603
+ #endif
6610
6604
}
6611
6605
6612
6606
@@ -17155,7 +17149,7 @@ uint8_t* gc_heap::find_object (uint8_t* interior, uint8_t* low)
17155
17149
#endif //MULTIPLE_HEAPS
17156
17150
#endif //FFIND_OBJECT
17157
17151
17158
- int brick_entry = brick_table [ brick_of (interior)] ;
17152
+ int brick_entry = get_brick_entry( brick_of (interior)) ;
17159
17153
if (brick_entry == 0)
17160
17154
{
17161
17155
// this is a pointer to a large object
@@ -27326,7 +27320,7 @@ uint8_t* gc_heap::find_first_object (uint8_t* start, uint8_t* first_object)
27326
27320
{
27327
27321
break;
27328
27322
}
27329
- if ((brick_entry = brick_table [ prev_brick ] ) >= 0)
27323
+ if ((brick_entry = get_brick_entry( prev_brick) ) >= 0)
27330
27324
{
27331
27325
break;
27332
27326
}
Original file line number Diff line number Diff line change @@ -1733,7 +1733,7 @@ class gc_heap
1733
1733
PER_HEAP
1734
1734
void set_brick (size_t index, ptrdiff_t val);
1735
1735
PER_HEAP
1736
- int brick_entry (size_t index);
1736
+ int get_brick_entry (size_t index);
1737
1737
#ifdef MARK_ARRAY
1738
1738
PER_HEAP
1739
1739
unsigned int mark_array_marked (uint8_t * add);
You can’t perform that action at this time.
0 commit comments