protected override void HandleObject(HeapCell aCell, int aIndex, int aCount) { if (aCell.Address == 0xc8023e5c || aCell.Address == 0xc8024064 || aCell.Address == 0xc80276d4 || aCell.Address == 0xc82100b4 ) { int x = 0; x++; } uint address = aCell.Address; HeapCell locatedCell = iReconstructor2.Data.CellByExactAddress(address); // if (locatedCell != null) { System.Diagnostics.Debug.Assert(aCell.Tag == null); // Remove sucessfully located cells from the 2nd list iReconstructor2.Data.Remove(locatedCell); // Check vtables to detect if the same HeapCell.TType origType = aCell.Type; HeapCell.TType locatedType = locatedCell.Type; uint origVTable = aCell.PossibleVTableAddress; uint locatedVTable = locatedCell.PossibleVTableAddress; // Compare length, type and vTable if (origType == locatedType) { // Type is the same... if (aCell.Length == locatedCell.Length) { CompareCellsWithSameLengths(aCell, locatedCell); } else { CompareCellsWithDifferentLengths(aCell, locatedCell); } } else { // The cell is not of the same type, so they cannot have // any commonality between them. Therefore they are unique in their // respective heaps. iUniqueInReconstructor1.Add(aCell); iUniqueInReconstructor2.Add(locatedCell); } } else { // There wasn't any corresponding cell in the second list, so it's got to be // unique to the first heap iUniqueInReconstructor1.Add(aCell); } }
public HeapStatisticsBase(HeapCell.TType aType) { iType = aType; }