seg = gen2.start_segment;
for (; seg && (i < count); ++i)
{
- pHeaps[0].Segments[i].Generation = 2;
+ pHeaps[0].Segments[i].Generation = seg->flags & HEAP_SEGMENT_FLAGS_READONLY ? CorDebug_NonGC : CorDebug_Gen2;
pHeaps[0].Segments[i].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[0].Segments[i].End = (CORDB_ADDRESS)seg->allocated;
seg = gen1.start_segment;
for (; seg && (i < count); ++i)
{
- pHeaps[0].Segments[i].Generation = 1;
+ pHeaps[0].Segments[i].Generation = CorDebug_Gen1;
pHeaps[0].Segments[i].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[0].Segments[i].End = (CORDB_ADDRESS)seg->allocated;
{
pHeaps[0].Segments[i].End = (CORDB_ADDRESS)seg->allocated;
}
- pHeaps[0].Segments[i].Generation = 0;
+ pHeaps[0].Segments[i].Generation = CorDebug_Gen0;
seg = seg->next;
}
if (seg.GetAddr() == (TADDR)*g_gcDacGlobals->ephemeral_heap_segment)
{
pHeaps[0].Segments[i].End = (CORDB_ADDRESS)*g_gcDacGlobals->alloc_allocated;
- pHeaps[0].Segments[i].Generation = 1;
+ pHeaps[0].Segments[i].Generation = CorDebug_Gen1;
pHeaps[0].EphemeralSegment = i;
}
else
{
pHeaps[0].Segments[i].End = (CORDB_ADDRESS)seg->allocated;
- pHeaps[0].Segments[i].Generation = 2;
+ pHeaps[0].Segments[i].Generation = seg->flags & HEAP_SEGMENT_FLAGS_READONLY ? CorDebug_NonGC : CorDebug_Gen2;
}
seg = seg->next;
seg = loh.start_segment;
for (; seg && (i < count); ++i)
{
- pHeaps[0].Segments[i].Generation = 3;
+ pHeaps[0].Segments[i].Generation = CorDebug_LOH;
pHeaps[0].Segments[i].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[0].Segments[i].End = (CORDB_ADDRESS)seg->allocated;
seg = poh.start_segment;
for (; seg && (i < count); ++i)
{
- pHeaps[0].Segments[i].Generation = 4;
+ pHeaps[0].Segments[i].Generation = CorDebug_POH;
pHeaps[0].Segments[i].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[0].Segments[i].End = (CORDB_ADDRESS)seg->allocated;
}
else
{
- // Otherwise, we have a gen2 or gen3 (LOH) segment
+ // Otherwise, we have a gen2, POH, LOH or NonGC
_ASSERTE(curr < total);
COR_SEGMENT &seg = (*pSegments)[curr++];
seg.start = heaps[i].Segments[j].Start;
seg.end = heaps[i].Segments[j].End;
- _ASSERTE(heaps[i].Segments[j].Generation <= CorDebug_POH);
+ _ASSERTE(heaps[i].Segments[j].Generation <= CorDebug_NonGC);
seg.type = (CorDebugGenerationTypes)heaps[i].Segments[j].Generation;
seg.heap = (ULONG)i;
}
seg = gen2.start_segment;
for (; seg && (j < count); ++j)
{
- pHeaps[i].Segments[j].Generation = 2;
+ pHeaps[i].Segments[j].Generation = seg->flags & HEAP_SEGMENT_FLAGS_READONLY ? CorDebug_NonGC : CorDebug_Gen2;;
pHeaps[i].Segments[j].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)seg->allocated;
seg = gen1.start_segment;
for (; seg && (j < count); ++j)
{
- pHeaps[i].Segments[j].Generation = 1;
+ pHeaps[i].Segments[j].Generation = CorDebug_Gen1;
pHeaps[i].Segments[j].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)seg->allocated;
{
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)pHeap->alloc_allocated;
pHeaps[i].EphemeralSegment = j;
- pHeaps[i].Segments[j].Generation = 0;
+ pHeaps[i].Segments[j].Generation = CorDebug_Gen0;
}
else
{
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)seg->allocated;
- pHeaps[i].Segments[j].Generation = 2;
+ pHeaps[i].Segments[j].Generation = seg->flags & HEAP_SEGMENT_FLAGS_READONLY ? CorDebug_NonGC : CorDebug_Gen2;;
}
seg = seg->next;
{
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)pHeap->alloc_allocated;
pHeaps[i].EphemeralSegment = j;
- pHeaps[i].Segments[j].Generation = 1;
+ pHeaps[i].Segments[j].Generation = CorDebug_Gen1;
}
else
{
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)seg->allocated;
- pHeaps[i].Segments[j].Generation = 2;
+ pHeaps[i].Segments[j].Generation = seg->flags & HEAP_SEGMENT_FLAGS_READONLY ? CorDebug_NonGC : CorDebug_Gen2;;
}
seg = seg->next;
seg = loh.start_segment;
for (; seg && (j < count); ++j)
{
- pHeaps[i].Segments[j].Generation = 3;
+ pHeaps[i].Segments[j].Generation = CorDebug_LOH;
pHeaps[i].Segments[j].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)seg->allocated;
seg = poh.start_segment;
for (; seg && (j < count); ++j)
{
- pHeaps[i].Segments[j].Generation = 4;
+ pHeaps[i].Segments[j].Generation = CorDebug_POH;
pHeaps[i].Segments[j].Start = (CORDB_ADDRESS)seg->mem;
pHeaps[i].Segments[j].End = (CORDB_ADDRESS)seg->allocated;