private void AddCLRRegions(ClrRuntime runtime) { foreach (var region in runtime.EnumerateMemoryRegions()) { // We don't need reserved memory in our dump if (region.Type == ClrMemoryRegionType.ReservedGCSegment) { continue; } ulong address = region.Address; ulong endAddress = region.Address + region.Size; ulong existingEndAddress; if (_majorClrRegions.Find(ref address, out existingEndAddress)) { _majorClrRegions.Update(region.Address, Math.Max(existingEndAddress, endAddress)); } else { _majorClrRegions.Add(region.Address, endAddress); } } }