src/Microsoft.Diagnostics.Runtime/ClrHeap.cs [921:943]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (type.ContainsPointers) { GCDesc gcdesc = type.GCDesc; if (!gcdesc.IsEmpty) { ulong size = GetObjectSize(obj, type); if (carefully) { ClrSegment? seg = GetSegmentByAddress(obj); if (seg is null) yield break; bool large = seg.Kind is GCSegmentKind.Large or GCSegmentKind.Pinned; if (obj + size > seg.End || (!large && size > MaxGen2ObjectSize)) yield break; } int intSize = (int)size; byte[] buffer = ArrayPool.Shared.Rent(intSize); int read = _memoryReader.Read(obj, new Span(buffer, 0, intSize)); if (read > IntPtr.Size) { foreach ((ulong reference, int offset) in gcdesc.WalkObject(buffer, read)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - src/Microsoft.Diagnostics.Runtime/ClrHeap.cs [1061:1083]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (type.ContainsPointers) { GCDesc gcdesc = type.GCDesc; if (!gcdesc.IsEmpty) { ulong size = GetObjectSize(obj, type); if (carefully) { ClrSegment? seg = GetSegmentByAddress(obj); if (seg is null) yield break; bool large = seg.Kind is GCSegmentKind.Large or GCSegmentKind.Pinned; if (obj + size > seg.End || (!large && size > MaxGen2ObjectSize)) yield break; } int intSize = (int)size; byte[] buffer = ArrayPool.Shared.Rent(intSize); int read = _memoryReader.Read(obj, new Span(buffer, 0, intSize)); if (read > IntPtr.Size) { foreach ((ulong reference, int offset) in gcdesc.WalkObject(buffer, read)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -