Пример #1
0
        /// <summary>
        /// Returns the object after this one on the segment.
        /// </summary>
        /// <param name="obj">The object to find the next for.</param>
        /// <returns>The next object on the segment, or 0 if the object was the last one on the segment.</returns>
        public virtual ulong NextObject(ulong obj)
        {
            ClrSegment seg = GetSegmentByAddress(obj);

            if (seg == null)
            {
                return(0);
            }

            return(seg.NextObject(obj));
        }
Пример #2
0
        public override IEnumerable <ulong> EnumerateObjectAddresses()
        {
            RevisionValidator.Validate(Revision, GetRuntimeRevision());

            for (int i = 0; i < _segments.Length; ++i)
            {
                ClrSegment seg = _segments[i];
                for (ulong obj = seg.FirstObject; obj != 0; obj = seg.NextObject(obj))
                {
                    _lastSegmentIdx = i;
                    yield return(obj);
                }
            }
        }
Пример #3
0
        public override IEnumerable <ulong> EnumerateObjectAddresses()
        {
            if (Revision != GetRuntimeRevision())
            {
                ClrDiagnosticsException.ThrowRevisionError(Revision, GetRuntimeRevision());
            }

            for (int i = 0; i < _segments.Length; ++i)
            {
                ClrSegment seg = _segments[i];
                for (ulong obj = seg.FirstObject; obj != 0; obj = seg.NextObject(obj))
                {
                    _lastSegmentIdx = i;
                    yield return(obj);
                }
            }
        }
Пример #4
0
        public override IEnumerable <ClrObject> EnumerateObjects()
        {
            if (Revision != GetRuntimeRevision())
            {
                ClrDiagnosticsException.ThrowRevisionError(Revision, GetRuntimeRevision());
            }

            for (int i = 0; i < _segments.Length; ++i)
            {
                ClrSegment seg = _segments[i];
                ClrType    type;
                for (ulong obj = seg.GetFirstObject(out type); obj != 0; obj = seg.NextObject(obj, out type))
                {
                    _lastSegmentIdx = i;
                    yield return(ClrObject.Create(obj, type));
                }
            }
        }
Пример #5
0
        public override IEnumerable <ClrObject> EnumerateObjects()
        {
            RevisionValidator.Validate(Revision, GetRuntimeRevision());

            for (int i = 0; i < _segments.Length; ++i)
            {
                ClrSegment seg = _segments[i];

                for (ulong obj = seg.GetFirstObject(out ClrType type); obj != 0; obj = seg.NextObject(obj, out type))
                {
                    _lastSegmentIdx = i;
                    yield return(ClrObject.Create(obj, type));
                }
            }
        }