private const int KFreeCellHeaderSize = 8;              // always
        #endregion

        #region Internal methods
        private long DoGetCombinedLinkedCellPayloadLengths(ref int aDepth)
        {
            long ret = PayloadLength;

            //
            if (aDepth <= KMaxRecursiveLinkedCellDepth)
            {
                iFlags |= TFlags.EFlagsInCombiningCheck;
                //
                foreach (RelationshipInfo relInfo in RelationshipManager.EmbeddedReferencesTo)
                {
                    HeapCell linkedCell    = relInfo.ToCell;
                    bool     isInLinkCheck = ((linkedCell.iFlags & TFlags.EFlagsInCombiningCheck) == TFlags.EFlagsInCombiningCheck);
                    if (isInLinkCheck == false)
                    {
                        ++aDepth;
                        ret += linkedCell.DoGetCombinedLinkedCellPayloadLengths(ref aDepth);
                    }
                    else
                    {
                    }
                }
                //
                iFlags &= ~TFlags.EFlagsInCombiningCheck;
            }
            //
            return(ret);
        }
Esempio n. 2
0
 private void iRenderer_CellSelected(HeapLib.Cells.HeapCell aCell)
 {
     if (CellSelected != null)
     {
         CellSelected(aCell);
     }
 }
        public override bool Equals(object aObject)
        {
            bool ret = false;

            //
            if (aObject is HeapCell)
            {
                HeapCell otherCell = (HeapCell)aObject;
                ret = Equals(otherCell);
            }
            //
            return(ret);
        }
        public bool IsIdentical(HeapCell aCell)
        {
            bool identical = false;

            //
            if (aCell.Length == this.Length &&
                aCell.PossibleVTableAddress == this.PossibleVTableAddress &&
                aCell.AllocationNumber == this.AllocationNumber &&
                aCell.NestingLevel == this.NestingLevel &&
                aCell.RawItems.Count == this.RawItems.Count)
            {
                identical = (aCell.Checksum == this.Checksum);
            }
            //
            return(identical);
        }
 internal HeapCell(HeapCell aCell)
     : this()
 {
     iTag            = aCell.Tag;
     iAddress        = aCell.Address;
     iType           = aCell.Type;
     iFlags          = aCell.iFlags;
     iSymbol[0]      = aCell.iSymbol[0];
     iSymbol[1]      = aCell.iSymbol[1];
     iSymbol[2]      = aCell.iSymbol[2];
     iRawItems       = aCell.iRawItems;
     iDescriptorInfo = aCell.iDescriptorInfo;
     iHeaderRawItems = aCell.iHeaderRawItems;
     iLength         = aCell.iLength;
     //
     iRelationshipManager = aCell.RelationshipManager;
     iChecksum            = new CRC32Checksum(aCell.Checksum);
 }
Esempio n. 6
0
 private void InitializeComponent()
 {
     HeapLib.Cells.HeapCell heapCell1 = new HeapLib.Cells.HeapCell();
     this.iContents = new HeapUiLib.Controls.HeapCellViewerControl();
     this.SuspendLayout();
     //
     // iContents
     //
     heapCell1.Address                     = ((uint)(0u));
     heapCell1.Index                       = ((uint)(0u));
     heapCell1.Symbol                      = null;
     heapCell1.Symbol2                     = null;
     heapCell1.Symbol3                     = null;
     heapCell1.Tag                         = null;
     heapCell1.Type                        = HeapLib.Cells.HeapCell.TType.EAllocated;
     this.iContents.Cell                   = heapCell1;
     this.iContents.Dock                   = System.Windows.Forms.DockStyle.Fill;
     this.iContents.Location               = new System.Drawing.Point(0, 0);
     this.iContents.MinimumSize            = new System.Drawing.Size(334, 120);
     this.iContents.Name                   = "iContents";
     this.iContents.Size                   = new System.Drawing.Size(355, 284);
     this.iContents.TabIndex               = 0;
     this.iContents.CellLinkDoubleClicked += new HeapUiLib.Controls.HeapCellViewerControl.OnCellLinkDoubleClicked(this.iContents_CellLinkDoubleClicked);
     //
     // HeapCellContentsForm
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
     this.ClientSize        = new System.Drawing.Size(355, 284);
     this.Controls.Add(this.iContents);
     this.Font            = new System.Drawing.Font("Tahoma", 8.25F);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.MinimumSize     = new System.Drawing.Size(363, 308);
     this.Name            = "HeapCellContentsForm";
     this.Text            = "Cell Viewer";
     this.TopMost         = true;
     this.Load           += new System.EventHandler(this.HeapViewerLinkedCellsForm_Load);
     this.Closing        += new System.ComponentModel.CancelEventHandler(this.HeapViewerLinkedCellsForm_Closing);
     this.ResumeLayout(false);
 }
Esempio n. 7
0
 private void iRenderer_AddressChanged(uint aAddressOld, uint aAddressNew, HeapLib.Cells.HeapCell aFirstCell, int aFirstCellIndex)
 {
     SetupScrollBar();
 }
Esempio n. 8
0
 public HeapCellRawItemEnumerator(HeapCell aCell)
 {
     iCell = aCell;
 }
        public bool Equals(HeapCell aOther)
        {
            bool ret = (aOther.Address == this.Address);

            return(ret);
        }