We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d48a44f commit 5880bc2Copy full SHA for 5880bc2
1 file changed
src/coreclr/gc/gc.cpp
@@ -43428,8 +43428,15 @@ void GCHeap::SetYieldProcessorScalingFactor (float scalingFactor)
43428
43429
unsigned int GCHeap::WhichGeneration (Object* object)
43430
{
43431
- gc_heap* hp = gc_heap::heap_of ((uint8_t*)object);
43432
- unsigned int g = hp->object_gennum ((uint8_t*)object);
+ uint8_t* o = (uint8_t*)object;
+#ifdef FEATURE_BASICFREEZE
43433
+ if (!((o < g_gc_highest_address) && (o >= g_gc_lowest_address)))
43434
+ {
43435
+ return max_generation;
43436
+ }
43437
+#endif //FEATURE_BASICFREEZE
43438
+ gc_heap* hp = gc_heap::heap_of (o);
43439
+ unsigned int g = hp->object_gennum (o);
43440
dprintf (3, ("%Ix is in gen %d", (size_t)object, g));
43441
return g;
43442
}
0 commit comments