@@ -2271,7 +2271,7 @@ SPTR_IMPL_NS(PTR_gc_heap, SVR, gc_heap, g_heaps);
2271
2271
size_t* gc_heap::g_promoted;
2272
2272
2273
2273
#ifdef MH_SC_MARK
2274
- BOOL* gc_heap::g_mark_stack_busy;
2274
+ int* gc_heap::g_mark_stack_busy;
2275
2275
#endif //MH_SC_MARK
2276
2276
2277
2277
@@ -4921,7 +4921,7 @@ class heap_select
4921
4921
return TRUE;
4922
4922
}
4923
4923
4924
- static void init_cpu_mapping(gc_heap *heap, int heap_number)
4924
+ static void init_cpu_mapping(gc_heap * /* heap*/ , int heap_number)
4925
4925
{
4926
4926
if (GCToOSInterface::CanGetCurrentProcessorNumber())
4927
4927
{
@@ -4942,8 +4942,10 @@ class heap_select
4942
4942
sniff_buffer[(1 + heap_number*n_sniff_buffers + sniff_index)*HS_CACHE_LINE_SIZE] &= 1;
4943
4943
}
4944
4944
4945
- static int select_heap(alloc_context* acontext, int hint)
4945
+ static int select_heap(alloc_context* acontext, int /* hint*/ )
4946
4946
{
4947
+ UNREFERENCED_PARAMETER(acontext); // only referenced by dprintf
4948
+
4947
4949
if (GCToOSInterface::CanGetCurrentProcessorNumber())
4948
4950
return proc_no_to_heap_no[GCToOSInterface::GetCurrentProcessorNumber() % gc_heap::n_heaps];
4949
4951
@@ -5103,7 +5105,7 @@ void gc_heap::destroy_thread_support ()
5103
5105
}
5104
5106
}
5105
5107
5106
- #if !defined(FEATURE_REDHAWK) && !defined( FEATURE_PAL)
5108
+ #if !defined(FEATURE_PAL)
5107
5109
void set_thread_group_affinity_for_heap(int heap_number, GCThreadAffinity* affinity)
5108
5110
{
5109
5111
affinity->Group = GCThreadAffinity::None;
@@ -5183,7 +5185,7 @@ void set_thread_affinity_mask_for_heap(int heap_number, GCThreadAffinity* affini
5183
5185
}
5184
5186
}
5185
5187
}
5186
- #endif // !FEATURE_REDHAWK && !FEATURE_CORECLR
5188
+ #endif // !FEATURE_PAL
5187
5189
5188
5190
bool gc_heap::create_gc_thread ()
5189
5191
{
@@ -5193,7 +5195,7 @@ bool gc_heap::create_gc_thread ()
5193
5195
affinity.Group = GCThreadAffinity::None;
5194
5196
affinity.Processor = GCThreadAffinity::None;
5195
5197
5196
- #if !defined(FEATURE_REDHAWK) && !defined( FEATURE_PAL)
5198
+ #if !defined(FEATURE_PAL)
5197
5199
if (!gc_thread_no_affinitize_p)
5198
5200
{
5199
5201
//We are about to set affinity for GC threads, it is a good place to setup NUMA and
@@ -5204,7 +5206,7 @@ bool gc_heap::create_gc_thread ()
5204
5206
else
5205
5207
set_thread_affinity_mask_for_heap(heap_number, &affinity);
5206
5208
}
5207
- #endif // !FEATURE_REDHAWK && ! FEATURE_PAL
5209
+ #endif // !FEATURE_PAL
5208
5210
5209
5211
return GCToOSInterface::CreateThread(gc_thread_stub, this, &affinity);
5210
5212
}
@@ -13179,7 +13181,7 @@ void gc_heap::balance_heaps (alloc_context* acontext)
13179
13181
org_hp->alloc_context_count--;
13180
13182
max_hp->alloc_context_count++;
13181
13183
acontext->alloc_heap = GCHeap::GetHeap(max_hp->heap_number);
13182
- #if !defined(FEATURE_REDHAWK) && !defined( FEATURE_PAL)
13184
+ #if !defined(FEATURE_PAL)
13183
13185
if (CPUGroupInfo::CanEnableGCCPUGroups())
13184
13186
{ //only set ideal processor when max_hp and org_hp are in the same cpu
13185
13187
//group. DO NOT MOVE THREADS ACROSS CPU GROUPS
@@ -13213,7 +13215,7 @@ void gc_heap::balance_heaps (alloc_context* acontext)
13213
13215
org_hp->heap_number));
13214
13216
}
13215
13217
}
13216
- #endif // !FEATURE_REDHAWK && ! FEATURE_PAL
13218
+ #endif // !FEATURE_PAL
13217
13219
dprintf (3, ("Switching context %p (home heap %d) ",
13218
13220
acontext,
13219
13221
acontext->home_heap->pGenGCHeap->heap_number));
@@ -13232,7 +13234,7 @@ void gc_heap::balance_heaps (alloc_context* acontext)
13232
13234
acontext->alloc_count++;
13233
13235
}
13234
13236
13235
- gc_heap* gc_heap::balance_heaps_loh (alloc_context* acontext, size_t size)
13237
+ gc_heap* gc_heap::balance_heaps_loh (alloc_context* acontext, size_t /* size*/ )
13236
13238
{
13237
13239
gc_heap* org_hp = acontext->alloc_heap->pGenGCHeap;
13238
13240
//dprintf (1, ("LA: %Id", size));
@@ -17762,8 +17764,8 @@ gc_heap::mark_steal()
17762
17764
if (((size_t)o > 4) && !partial_object_p (o))
17763
17765
{
17764
17766
//this is a normal object, not a partial mark tuple
17765
- //success = (FastInterlockCompareExchangePointer (&ref_mark_stack (hp, level), 0, o)==o);
17766
- success = (FastInterlockCompareExchangePointer (&ref_mark_stack (hp, level), 4, o)==o);
17767
+ //success = (Interlocked::CompareExchangePointer (&ref_mark_stack (hp, level), 0, o)==o);
17768
+ success = (Interlocked::CompareExchangePointer (&ref_mark_stack (hp, level), (uint8_t*) 4, o)==o);
17767
17769
#ifdef SNOOP_STATS
17768
17770
snoop_stat.interlocked_count++;
17769
17771
if (success)
@@ -17798,7 +17800,7 @@ gc_heap::mark_steal()
17798
17800
if (o && start)
17799
17801
{
17800
17802
//steal the object
17801
- success = (FastInterlockCompareExchangePointer (&ref_mark_stack (hp, level+1), stolen, next)==next);
17803
+ success = (Interlocked::CompareExchangePointer (&ref_mark_stack (hp, level+1), (uint8_t*) stolen, next)==next);
17802
17804
#ifdef SNOOP_STATS
17803
17805
snoop_stat.interlocked_count++;
17804
17806
if (success)
@@ -23303,13 +23305,8 @@ uint8_t* tree_search (uint8_t* tree, uint8_t* old_address)
23303
23305
#ifdef FEATURE_BASICFREEZE
23304
23306
bool gc_heap::frozen_object_p (Object* obj)
23305
23307
{
23306
- #ifdef MULTIPLE_HEAPS
23307
- ptrdiff_t delta = 0;
23308
- heap_segment* pSegment = segment_of ((uint8_t*)obj, delta);
23309
- #else //MULTIPLE_HEAPS
23310
23308
heap_segment* pSegment = gc_heap::find_segment ((uint8_t*)obj, FALSE);
23311
23309
_ASSERTE(pSegment);
23312
- #endif //MULTIPLE_HEAPS
23313
23310
23314
23311
return heap_segment_read_only_p(pSegment);
23315
23312
}
@@ -23326,6 +23323,7 @@ void gc_heap::relocate_address (uint8_t** pold_address THREAD_NUMBER_DCL)
23326
23323
if (!((old_address >= gc_low) && (old_address < gc_high)))
23327
23324
#ifdef MULTIPLE_HEAPS
23328
23325
{
23326
+ UNREFERENCED_PARAMETER(thread);
23329
23327
if (old_address == 0)
23330
23328
return;
23331
23329
gc_heap* hp = heap_of (old_address);
@@ -35426,7 +35424,7 @@ int GCHeap::GetHomeHeapNumber ()
35426
35424
{
35427
35425
if (pThread)
35428
35426
{
35429
- GCHeap *hp = pThread-> GetAllocContext()->home_heap;
35427
+ GCHeap *hp = GCToEEInterface:: GetAllocContext(pThread )->home_heap;
35430
35428
if (hp == gc_heap::g_heaps[i]->vm_heap) return i;
35431
35429
}
35432
35430
}
0 commit comments