HeapAnalyser 1.1.0
authorMatti Laitinen <matti.t.laitinen@nokia.com>
Tue, 15 Jun 2010 12:47:20 +0300
changeset 8 15296fd0af4a
parent 7 8e12a575a9b5
child 9 14dc2103a631
HeapAnalyser 1.1.0
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/CellCounts.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/ComparerBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/Fragmentation.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/HeapSize.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/LargestCells.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/SlackSpace.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/DataSet/CSVDataSet.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/DataSet/CSVDataSetCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Engine/CSVComparisonEngine.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Excel/CSVExcelExporterAllDataSets.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Excel/CSVExcelExporterTwoDataSets.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/CSVThread.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/CSVThreadPair.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/CSVThreadParser.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/Parsers/CSVThreadParserFormatNew.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/Parsers/CSVThreadParserFormatOld.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Workers/CSVWorkerAllDataSetComparator.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Workers/CSVWorkerLogSplitter.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Workers/CSVWorkerTwoDataSetComparator.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/ComparsionEngine.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/ComparsionWriter.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageSimpleListing.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageUnchanged.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageUnique.cs
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/HeapComparisonLib.csproj
sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Properties/AssemblyInfo.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArray.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayAllocationNumberMap.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayEnumerator.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayUnsorted.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayWithStatistics.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/AssemblyInfo.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/DescriptorAlgorithmBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/DescriptorAlgorithmManager.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/DescriptorInfo.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmHBufC.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmModifiableBuffers.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmNullTerminatedString.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Unicode/DesUnicodeAlgorithmBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Unicode/DesUnicodeAlgorithmHBufC.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Unicode/DesUnicodeAlgorithmModifiableBuffers.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/HeapCell.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/HeapCellComparers.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/HeapCellRawItemEnumerator.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Constants/HeapLibConstants.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/HeapDataJavaScriptLib.js
sysperfana/heapanalyser/Libraries/Engine/HeapLib/HeapLib.csproj
sysperfana/heapanalyser/Libraries/Engine/HeapLib/HeapLib.csproj.user
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Misc/HeapViewFormObjects.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLConverter.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageEntireListing.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageHeapCellManager.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageHeapData.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageHeapLinkedCells.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageIndex.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageJavaScriptManager.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_Text/HeapToFileConverter.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/DataSourceAnalyser.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/Base/Extractor.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/ExtractedData.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/ExtractorFactory.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/Implementations/ExtractorBinary.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/Implementations/ExtractorText.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/Base/InterpreterBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/Implementations/InterpreterBinary.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/Implementations/InterpreterText.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/InterpreterFactory.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Readers/ReaderFile.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Readers/ReaderLines.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Data/GlobalData.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Data/HeapData.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Data/StackData.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpChunks.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpFooter.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeader.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeap.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeapAllocCell.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeapFreeCell.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/MetaData.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Source/DataSource.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Source/DataSourceCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Thread/DataSourceThread.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Thread/DataSourceThreadCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/HeapReconstructor.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/Misc/Options.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/Misc/Prefixes.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/ExtractionManager.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/ExtractionState.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/Extractor.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/RawItemPrecursor.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/RawItemQueue.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipDictionary.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipInfo.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipInspector.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipManager.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Distribution/HeapCellSizeDistribution.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Distribution/HeapCellSizeDistributionEnumerator.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/HeapStatistics.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/Base/TrackingCollectionBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/Base/TrackingComparisonObjects.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/Base/TrackingInfo.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/ByDescriptor/DescriptorTrackingInfoCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/ByObject/ObjectTrackingInfoCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/BySymbol/SymbolTrackingInfoCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/ByUnknown/UnknownTrackingInfoCollection.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Types/HeapStatisticsAllocated.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Types/HeapStatisticsBase.cs
sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Types/HeapStatisticsFree.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/AssemblyInfo.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Interfaces/CollectionManager.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisLib.csproj
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisLib.csproj.user
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisRegionalCollection.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisSorters.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisStatisticalCollection.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Class/MemOpClass.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnAllocations.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnFrees.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnKBase.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnReallocations.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/MemOpFnBase.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnAllocations.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnFrees.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnReallocations.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnUBase.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpAllocation.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpBase.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpFree.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpReallocation.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Base/MemAnalysisParserBase.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Implementations/MemAnalysisRegionalParser.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Implementations/MemAnalysisStatisticalParser.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Options/MemAnalysisParserOptions.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Prefixes/Kernel/MemAnalysisParserPrefixesKernel.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Prefixes/MemAnalysisParserPrefixesBase.cs
sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Prefixes/User/MemAnalysisParserPrefixesUser.cs
sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/HeapComparisonUiLib.csproj
sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogCSV.cs
sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogCSV.resx
sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogData.cs
sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogData.resx
sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Properties/AssemblyInfo.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/AssemblyInfo.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapDataControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapDataControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapFilteringControl.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapFilteringControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapFilteringControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Dialogs/HeapRendererFilterConfigDialog.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Dialogs/HeapRendererFilterConfigDialog.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Dialogs/HeapRendererFilterConfigDialog.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/Factory.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByAge.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByCellType.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByEmbeddedReferences.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByIsolation.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByLength.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByObject.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryBySymbol.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryRenderers.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/HeapCtrlLib.csproj
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/HeapCtrlLib.csproj.user
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Interfaces/HeapCellPopupManager.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Interfaces/HeapCellRenderers.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupBase.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupBase.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedRaw.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedRaw.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedSymbol.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedSymbol.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellFree.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellFree.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellRelationshipInfo.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellRelationshipInfo.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupMultiCellSelection.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupMultiCellSelection.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerBase.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerByAge.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerByEmbeddedReferences.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerBySymbol.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/ContentBorders/HeapCellRendererContentBorder.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/ContentBorders/HeapCellRendererContentBorder3d.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/ContentBorders/HeapCellRendererContentBorderFloating.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/Bases/HeapCellRendererByColour.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/Bases/HeapCellRendererWithText.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByAge.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByCellType.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByEmbeddedReferences.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByIsolation.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByLength.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByObject.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourBySymbol.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/HeapDataRenderer.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/HeapDataRenderer.resx
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/RowHeader/HeapCellRendererRowHeader.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/SelectionBorders/HeapCellRendererSelectionBorder.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/SelectionBorders/HeapCellRendererSelectionBorderItem.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Utilities/HeapCellRendererColour.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Types/HeapCellCtrlTypes.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellBorderInfo.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellBorderType.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellFilterTriplet.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellLargestRectangleCalculator.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellMetaData.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapRenderingNavigator.cs
sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapSelectionBorderType.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/AssemblyInfo.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/FilterTypes.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellInfoControl.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellInfoControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellInfoControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingFilter.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingFilter.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingFilter.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellRelationshipControl.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellRelationshipControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellRelationshipControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellSizeDistributionControl.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellSizeDistributionControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellSizeDistributionControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellStatsControl.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellStatsControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellStatsControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellViewerControl.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellViewerControl.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellViewerControl.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapExportToHTMLProgressDialog.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapExportToHTMLProgressDialog.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorDataSourceAnalyserDialog.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorDataSourceAnalyserDialog.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorProgressDialog.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorProgressDialog.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapViewerAboutDialog.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapViewerAboutDialog.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Forms/HeapViewerForm.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Forms/HeapViewerForm.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/HeapUiLib.csproj
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/HeapUiLib.csproj.user
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Misc/CellRightClickMetaData.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Misc/TrackingInfoCaptioner.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Properties/Resources.Designer.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Properties/Resources.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellContentsForm.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellContentsForm.resx
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellRelationshipInspectorForm.cs
sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellRelationshipInspectorForm.resx
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/AssemblyInfo.cs
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Dialogs/MemAnalysisParsingProgressDialog.cs
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Dialogs/MemAnalysisParsingProgressDialog.resx
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisRegionalForm.cs
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisRegionalForm.resx
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisStatisticalForm.cs
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisStatisticalForm.resx
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/MemAnalysisUiLib.csproj
sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/MemAnalysisUiLib.csproj.user
sysperfana/heapanalyser/OSS/zedgraph_source_v515.zip
sysperfana/heapanalyser/UI/App.ico
sysperfana/heapanalyser/UI/AssemblyInfo.cs
sysperfana/heapanalyser/UI/Engine/HeapWizardEngine.cs
sysperfana/heapanalyser/UI/Engine/Types/AnalyseEngineHeapData.cs
sysperfana/heapanalyser/UI/Engine/Types/ComparisonEngineHeapCSV.cs
sysperfana/heapanalyser/UI/Engine/Types/ComparisonEngineHeapData.cs
sysperfana/heapanalyser/UI/EntryPoint.cs
sysperfana/heapanalyser/UI/Exceptions/HAUIException.cs
sysperfana/heapanalyser/UI/HeapAnalyser.csproj
sysperfana/heapanalyser/UI/HeapAnalyser.csproj.user
sysperfana/heapanalyser/UI/HeapAnalyser.sln
sysperfana/heapanalyser/UI/UIs/Console/Files/HACmdLineFSEntity.cs
sysperfana/heapanalyser/UI/UIs/Console/Files/HACmdLineFSEntityList.cs
sysperfana/heapanalyser/UI/UIs/Console/Files/HACmdLineFileSource.cs
sysperfana/heapanalyser/UI/UIs/Console/HAUIConsole.cs
sysperfana/heapanalyser/UI/UIs/Console/Inputs/HACmdLineInputParameters.cs
sysperfana/heapanalyser/UI/UIs/Graphical/HAUIGraphical.cs
sysperfana/heapanalyser/UI/UIs/Graphical/Wizard/HASetupWizard.Designer.cs
sysperfana/heapanalyser/UI/UIs/Graphical/Wizard/HASetupWizard.cs
sysperfana/heapanalyser/UI/UIs/Graphical/Wizard/HASetupWizard.resx
sysperfana/heapanalyser/UI/UIs/HAUI.cs
sysperfana/heapanalyser/UI/UIs/HAUIManager.cs
sysperfana/heapanalyser/UI/bin/Debug/SupportingLibraries.txt
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/CellCounts.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Runtime.InteropServices;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+
+namespace HeapComparisonLib.CSV.Comparers
+{
+    internal class CellCounts : ComparerBase
+	{
+		#region Constructors & destructor
+		public CellCounts( Worksheet aSheet, string aFileName1, string aFileName2 )
+		:	base( aSheet, aFileName1, aFileName2 )
+		{
+		}
+		#endregion
+
+		#region API
+		public override string DeltaFormula( int aIndex )
+		{
+			int column = 4;
+			//
+			if	( aIndex != 0 )
+			{
+				column = 8;
+			}
+			//
+			return Utils.MakeSummationFormula( 3, Row - 2, column, Sheet );
+		}
+
+		public override void PrepareWorksheetReadyForData()
+		{
+			Sheet.Name = "Cell Counts by Type";
+			//
+			Range r = null;
+			//
+			Utils.SetValue( Row,  1, Sheet, "Thread" );
+			r = Utils.SetValue( Row,  2, Sheet, "Free Count" );
+			r.AddComment( FileName1 );
+			r = Utils.SetValue( Row,  3, Sheet, "Free Count" );
+			r.AddComment( FileName2 );
+			Utils.SetValue( Row,  4, Sheet, "Delta" );
+			//
+			Utils.SetValue( Row,  5, Sheet, " " );
+			//
+			r = Utils.SetValue( Row,  6, Sheet, "Alloc Count" );
+			r.AddComment( FileName1 );
+			r = Utils.SetValue( Row,  7, Sheet, "Alloc Count" );
+			r.AddComment( FileName2 );
+			Utils.SetValue( Row,  8, Sheet, "Delta" );
+			//
+			Utils.MakeBoxedTitleRow( Row, 8, Sheet, 0xFF0000 );
+			//
+			NextRow();
+			NextRow();
+		}
+
+		public override void FinaliseWorksheet()
+		{
+			// Make totals
+			NextRow();
+			Utils.SetValue( Row, 1, Sheet, "Totals:" );
+			
+			Utils.SetValue( Row, 2, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 2) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 2) + ")" );
+			Utils.SetValue( Row, 3, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 3) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 3) + ")" );
+			Utils.SetValue( Row, 4, Sheet, DeltaFormula( 0 ) );
+			//
+			Utils.SetValue( Row, 6, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 6) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 6) + ")" );
+			Utils.SetValue( Row, 7, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 7) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 7) + ")" );
+			Utils.SetValue( Row, 8, Sheet, DeltaFormula( 1 ) );
+			Utils.BoldRow( Row, Sheet );
+
+			Utils.AutoFitColumn( 1, Sheet, 70.0 );
+			for( int col=2; col<=8; col++ )
+			{
+				Utils.AutoFitColumn( col, Sheet );
+			}
+		}
+
+        public override void Compare( CSVThread aMaster, CSVThread aOther )
+		{
+            Utils.SetValue( Row, 1, Sheet, aMaster.FullName );
+			//
+			CompareAndWriteItems( aMaster, aMaster.FreeCellCount,  aOther, aOther.FreeCellCount,  2, 0xFF0000, 0x0000FF );
+			CompareAndWriteItems( aMaster, aMaster.AllocCellCount, aOther, aOther.AllocCellCount, 6, 0x0000FF, 0xFF0000 );
+			//
+			if	( aMaster.IsDefault || aOther.IsDefault )
+			{
+				Utils.GetRangeByColumnAndRow( Row, 1, Row, 1, Sheet ).Font.Bold = true;
+			}
+			//
+			NextRow();
+		}
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/ComparerBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Runtime.InteropServices;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+
+namespace HeapComparisonLib.CSV.Comparers
+{
+    internal abstract class ComparerBase
+	{
+		#region Constructors & destructor
+		protected ComparerBase( Worksheet aSheet, string aFileName1, string aFileName2 )
+		{
+			iWorksheet = aSheet;
+			iFileName1 = aFileName1;
+			iFileName2 = aFileName2;
+		}
+		#endregion
+
+		#region API
+		public abstract void PrepareWorksheetReadyForData();
+		public abstract void FinaliseWorksheet();
+        public abstract void Compare( CSVThread aOther, CSVThread aMaster );
+
+		public virtual string DeltaFormula( int aIndex )
+		{
+			return string.Empty;
+		}
+		#endregion
+
+		#region Internal Properties
+		protected int Row
+		{
+			get { return iRowNumber; }
+		}
+
+		protected Worksheet Sheet
+		{
+			get { return iWorksheet; }
+		}
+
+		protected string FileName1
+		{
+			get { return iFileName1; }
+		}
+
+		protected string FileName2
+		{
+			get { return iFileName2; }
+		}
+		#endregion
+
+		#region Internal methods
+		protected void NextRow()
+		{
+			++iRowNumber;
+		}
+
+        protected void CompareAndWriteItems( CSVThread aItem1, long aItemVal1, CSVThread aItem2, long aItemVal2, int aColumn, int aGrowColour, int aShrinkColour )
+		{
+			// First write the values to the columns
+			if	( !aItem1.IsDefault )
+				Utils.SetValue( Row, aColumn   , Sheet, aItemVal1.ToString() );
+			if	( !aItem2.IsDefault )
+				Utils.SetValue( Row, aColumn + 1, Sheet, aItemVal2.ToString() );
+
+			// Delta
+			long delta = aItemVal1 - aItemVal2;
+			Utils.SetValue( Row, aColumn + 2, Sheet, ( delta * -1).ToString() );
+
+			// Colour code accordingly
+			int colour = 0x000000; // black
+			if	( aItemVal1 < aItemVal2 )
+			{
+				colour = aGrowColour; // 0x0000FF; // red
+			}
+			else if ( aItemVal1 > aItemVal2 )
+			{
+				colour = aShrinkColour; // 0x00FF00; // green
+			}
+			Utils.SetRangeFontColour( Row, aColumn + 2, Row, aColumn + 2, Sheet, colour );
+		}
+		#endregion
+
+		#region Data members
+		private readonly string iFileName1;
+		private readonly string iFileName2;
+		private readonly Worksheet iWorksheet;
+		private int iRowNumber = 1;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/Fragmentation.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Runtime.InteropServices;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+
+namespace HeapComparisonLib.CSV.Comparers
+{
+    internal class Fragmentation : ComparerBase
+	{
+		#region Constructors & destructor
+		public Fragmentation( Worksheet aSheet, string aFileName1, string aFileName2 )
+		:	base( aSheet, aFileName1, aFileName2 )
+		{
+		}
+		#endregion
+
+		#region API
+		public override string DeltaFormula( int aIndex )
+		{
+			int column = 4;
+			return Utils.MakeSummationFormula( 3, Row - 2, column, Sheet );
+		}
+
+		public override void PrepareWorksheetReadyForData()
+		{
+			Sheet.Name = "Fragmentation";
+			//
+			Range r = null;
+			//
+			Utils.SetValue( Row, 1, Sheet, "Thread" );
+			r = Utils.SetValue( Row, 2, Sheet, "Fragmentation" );
+			r.AddComment( FileName1 );
+			r = Utils.SetValue( Row, 3, Sheet, "Fragmentation" );
+			r.AddComment( FileName2 );
+			Utils.SetValue( Row, 4, Sheet, "Delta" );
+			//
+			Utils.MakeBoxedTitleRow( Row, 4, Sheet, 0xFF0000 );
+			//
+			NextRow();
+			NextRow();
+		}
+
+		public override void FinaliseWorksheet()
+		{
+			// Make totals
+			NextRow();
+			Utils.SetValue( Row, 1, Sheet, "Totals:" );
+			Utils.SetValue( Row, 2, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 2) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 2) + ")" );
+			Utils.SetValue( Row, 3, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 3) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 3) + ")" );
+			Utils.SetValue( Row, 4, Sheet, DeltaFormula( 0 ) );
+			Utils.BoldRow( Row, Sheet );
+
+			// Format cells as percentages
+			Range r = Utils.GetRangeByColumnAndRow( 3, 2, Row, 4, Sheet );
+			r.NumberFormat = "0.00%";
+
+			// Calculate column sizes
+			Utils.AutoFitColumn( 1, Sheet, 70.0 );
+			Utils.AutoFitColumn( 2, Sheet );
+			Utils.AutoFitColumn( 3, Sheet );
+			Utils.AutoFitColumn( 4, Sheet );
+		}
+
+        public override void Compare( CSVThread aMaster, CSVThread aOther )
+		{
+            Utils.SetValue( Row, 1, Sheet, aMaster.FullName );
+			//
+			float frag1Value = (float) aMaster.FreeSpaceTotal / (float) aMaster.SizeCurrent;
+			string frag1 = "=" + aMaster.FreeSpaceTotal.ToString() + " / " + aMaster.SizeCurrent.ToString();
+			if	( aMaster.SizeCurrent == 0 )
+			{
+				frag1Value = 0.0F;
+				frag1 = "=0";
+			}
+			if	( !aMaster.IsDefault )
+				Utils.SetValue( Row, 2, Sheet, frag1 );
+			//
+			float frag2Value = (float) aOther.FreeSpaceTotal / (float) aOther.SizeCurrent;
+			string frag2 = "=" + aOther.FreeSpaceTotal.ToString() + " / " + aOther.SizeCurrent.ToString();
+			if	( aOther.SizeCurrent == 0 )
+			{
+				frag2Value = 0.0F;
+				frag2 = "=0";
+			}
+			if	( !aOther.IsDefault )
+				Utils.SetValue( Row, 3, Sheet, frag2 );
+
+			if	( aMaster.IsDefault || aOther.IsDefault )
+			{
+				Utils.GetRangeByColumnAndRow( Row, 1, Row, 1, Sheet ).Font.Bold = true;
+			}
+
+			// Delta
+			float delta = frag1Value - frag2Value;
+			Utils.SetValue( Row, 4, Sheet, ( delta * -1.0).ToString() );
+
+			// Colourise line according to difference
+			int colour = 0x000000; // black
+			if	( frag2Value > frag1Value )
+			{
+				// Original size was smaller than new size => heap has grown
+				colour = 0x0000FF; // red
+			}
+			else if ( frag2Value < frag1Value )
+			{
+				// Original size was bigger than new size => heap has shrunk
+				colour = 0xFF0000; // blue
+			}
+			Utils.SetRangeFontColour( Row, 4, Row, 4, Sheet, colour );
+			//
+			NextRow();
+		}
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/HeapSize.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,350 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Runtime.InteropServices;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+using SymbianUtils.Colour;
+
+namespace HeapComparisonLib.CSV.Comparers
+{
+    internal class HeapSize : ComparerBase
+	{
+		#region Constructors & destructor
+		public HeapSize( Worksheet aSheet, string aFileName1, string aFileName2 )
+		:	base( aSheet, aFileName1, aFileName2 )
+		{
+            // Build colour list for shared chunks
+            foreach( string colorName in KColourTable )
+            {
+                iSharedChunkColours.Enqueue( Color.FromName( colorName ) );
+            }
+		}
+		#endregion
+
+		#region API
+		public override string DeltaFormula( int aIndex )
+		{
+            int column = 4;
+            //
+            switch ( aIndex )
+            {
+                default:
+                case 0:
+                    column = 4;
+                    break;
+                case 1:
+                    column = 8;
+                    break;
+                case 2:
+                    column = 12;
+                    break;
+            }
+            //
+            return Utils.MakeSummationFormula( 3, Row - 2, column, Sheet );
+		}
+
+		public override void PrepareWorksheetReadyForData()
+		{
+			Sheet.Name = "Heap Size";
+			//
+			Utils.SetValue( Row, 1, Sheet, "Thread" );
+            MakeColumnTitleWithDelta( 2, "Heap Size" );
+            Utils.SetValue( Row, 5, Sheet, "" );
+            MakeColumnTitleWithDelta( 6, "Free Space" );
+            Utils.SetValue( Row, 9, Sheet, "" );
+            MakeColumnTitleWithDelta( 10, "Alloc Space" );
+            Utils.SetValue( Row, 13, Sheet, "" );
+			Utils.SetValue( Row, 14, Sheet, "Max. Heap Size" );
+			//
+			Utils.MakeBoxedTitleRow( Row, 14, Sheet, 0xFF0000 );
+			//
+			NextRow();
+			NextRow();
+		}
+
+		public override void FinaliseWorksheet()
+		{
+			// Make total row
+			NextRow();
+			Utils.SetValue( Row, 1, Sheet, "Totals:" );
+
+            // Heap size
+			Utils.SetValue( Row, 2, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 2) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 2) + ")" );
+			Utils.SetValue( Row, 3, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 3) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 3) + ")" );
+			Utils.SetValue( Row, 4, Sheet, DeltaFormula( 0 ) );
+
+            // Free space
+            Utils.SetValue( Row, 6, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 6 ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 6 ) + ")" );
+            Utils.SetValue( Row, 7, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 7 ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 7 ) + ")" );
+            Utils.SetValue( Row, 8, Sheet, DeltaFormula( 1 ) );
+
+            // Alloc space
+            Utils.SetValue( Row, 10, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 10 ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 10 ) + ")" );
+            Utils.SetValue( Row, 11, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 11 ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 11 ) + ")" );
+            Utils.SetValue( Row, 12, Sheet, DeltaFormula( 2 ) );
+
+            Utils.BoldRow( Row, Sheet );
+
+			// Calculate column sizes
+			Utils.AutoFitColumn( 1, Sheet, 70.0 );
+			Utils.AutoFitColumn( 2, Sheet );
+			Utils.AutoFitColumn( 3, Sheet );
+			Utils.AutoFitColumn( 4, Sheet );
+			Utils.AutoFitColumn( 5, Sheet, 10.0 );
+            Utils.AutoFitColumn( 6, Sheet );
+            Utils.AutoFitColumn( 7, Sheet );
+            Utils.AutoFitColumn( 8, Sheet );
+            Utils.AutoFitColumn( 9, Sheet, 10.0 );
+            Utils.AutoFitColumn( 10, Sheet );
+            Utils.AutoFitColumn( 11, Sheet );
+            Utils.AutoFitColumn( 12, Sheet );
+            Utils.AutoFitColumn( 13, Sheet, 10.0 );
+            Utils.AutoFitColumn( 14, Sheet );
+        }
+
+        public override void Compare( CSVThread aMaster, CSVThread aOther )
+		{
+            // Set thread and make bold if one of the entries is just a default
+            // i.e. blank placeholder (occurs when a thread doesn't exist in one or
+            // other comparsion lists)
+            Range threadName = Utils.SetValue( Row, 1, Sheet, aMaster.FullName );
+            if ( aMaster.IsDefault || aOther.IsDefault )
+            {
+                Utils.GetRangeByColumnAndRow( Row, 1, Row, 1, Sheet ).Font.Bold = true;
+            }
+
+            if ( aMaster.IsSharedHeap )
+            {
+                long chunkHandle = aMaster.ChunkHandle;
+                Color backColour = ColourForChunkHandle( chunkHandle );
+                threadName.Interior.Color = backColour.ToArgb();
+
+                // Check text will be legible
+                Color foreColour = Color.Black;
+                float lum = backColour.GetBrightness();
+                if ( lum < 0.5 )
+                {
+                    foreColour = Color.White;
+                }
+
+                threadName.Font.Color = foreColour.ToArgb();
+            }
+
+            // Column 2 -> Column 4 ====> Heap size comparsion
+            CreateComparsion( 2, aMaster, aOther, aMaster.SizeCurrent, aOther.SizeCurrent, -1 );
+            
+            // Column 5 is a spacer
+
+            // Column 6 -> Column 8 ====> Free space comparsion
+            CreateComparsion( 6, aMaster, aOther, aMaster.FreeSpaceTotal, aOther.FreeSpaceTotal, 1 );
+            
+            // Column 9 is a spacer
+
+            // Column 10 -> Column 12 ====> Alloc space comparsion
+            CreateComparsion( 10, aMaster, aOther, aMaster.AllocSpaceTotal, aOther.AllocSpaceTotal, -1 );
+            
+            // Column 13 is a spacer
+            
+            // Max heap size is the same for both
+            Utils.SetValue( Row, 14, Sheet, aOther.SizeMax.ToString() );
+
+            // Next comes the free cell size
+
+            NextRow();
+		}
+		#endregion
+
+        #region Internal methods
+        private void MakeColumnTitleWithDelta( int aColumn, string aCaption )
+        {
+            Range r = null;
+            //
+            r = Utils.SetValue( Row, aColumn, Sheet, aCaption );
+            r.AddComment( FileName1 );
+            r = Utils.SetValue( Row, aColumn + 1, Sheet, aCaption );
+            r.AddComment( FileName2 );
+            Utils.SetValue( Row, aColumn + 2, Sheet, "Delta" );
+        }
+
+        private void CreateComparsion( int aStartCol, CSVThread aMaster, CSVThread aOther, long aMasterVal, long aOtherVal, int aMultiplier )
+        {
+            if ( !aMaster.IsDefault )
+            {
+                Utils.SetValue( Row, aStartCol, Sheet, aMasterVal.ToString() );
+            }
+            if ( !aOther.IsDefault )
+            {
+                Utils.SetValue( Row, aStartCol + 1, Sheet, aOtherVal.ToString() );
+            }
+
+            // Delta
+            long delta = 0;
+            
+
+            int colour = 0x000000; // black
+            if ( aMultiplier < 0 )
+            {
+                delta = aMasterVal - aOtherVal;
+                if ( delta < 0 )
+                {
+                    // Original size was smaller than new size => heap has grown
+                    colour = 0x0000FF; // red
+                }
+                else if ( delta > 0 )
+                {
+                    // Original size was bigger than new size => heap has shrunk
+                    colour = 0xFF0000; // blue
+                }
+            }
+            else if ( aMultiplier > 0 )
+            {
+                delta = ( aMasterVal - aOtherVal ) * -1;
+                if ( delta < 0 )
+                {
+                    // Original size was smaller than new size => heap has grown
+                    colour = 0x0000FF; // red
+                }
+                else if ( delta > 0 )
+                {
+                    // Original size was bigger than new size => heap has shrunk
+                    colour = 0xFF0000; // blue
+                }
+            }
+
+            Utils.SetValue( Row, aStartCol + 2, Sheet, ( delta * aMultiplier ).ToString() );
+            Utils.SetRangeFontColour( Row, aStartCol + 2, Row, aStartCol + 2, Sheet, colour );
+        }
+
+        private Color ColourForChunkHandle( long aHandle )
+        {
+            Color ret = Color.Transparent;
+
+            // Is it already in the dictionary?
+            if ( iSharedChunkColourDictionary.ContainsKey( aHandle ) )
+            {
+                ret = iSharedChunkColourDictionary[ aHandle ];
+            }
+            else
+            {
+                // Nope, need to allocate a new one
+                if ( iSharedChunkColours.Count > 0 )
+                {
+                    ret = iSharedChunkColours.Dequeue();
+                    iSharedChunkColourDictionary.Add( aHandle, ret );
+                }
+                else
+                {
+                    // Run out of colours!
+                }
+            }
+
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private readonly static string[] KColourTable = { 
+            "AliceBlue",
+	        "Azure",
+	        "Bisque",
+	        "BlanchedAlmond",
+	        "BlueViolet",
+	        "Brown",
+	        "Chartreuse",
+	        "Crimson",
+	        "Cyan",
+	        "DarkGoldenrod",
+	        "DarkOliveGreen",
+	        "DarkOrange",
+	        "DarkOrchid",
+	        "DarkSalmon",
+	        "DarkTurquoise",
+	        "DeepPink",
+	        "DeepSkyBlue",
+	        "Gainsboro",
+	        "Goldenrod",
+	        "GreenYellow",
+	        "HotPink",
+	        "Ivory",
+	        "Lavender",
+	        "LawnGreen",
+	        "LightBlue",
+	        "LightGoldenrodYellow",
+	        "LightSalmon",
+	        "LightSteelBlue",
+	        "Linen",
+	        "MediumPurple",
+	        "MediumSpringGreen",
+	        "MintCream",
+	        "MistyRose",
+	        "Moccasin",
+	        "Olive",
+	        "Orange",
+	        "OrangeRed",
+	        "PaleGreen",
+	        "PaleTurquoise",
+	        "PaleVioletRed",
+	        "PeachPuff",
+	        "Peru",
+	        "Pink",
+	        "Red",
+	        "RoyalBlue",
+	        "Salmon",
+	        "SeaShell",
+	        "Silver",
+	        "SkyBlue",
+	        "SlateBlue",
+	        "Tomato",
+	        "Turquoise",
+	        "Violet",
+	        "Wheat",
+	        "WhiteSmoke",
+	        "Yellow",
+	        "YellowGreen"
+        };
+        #endregion
+
+        #region Data members
+        private Queue<Color> iSharedChunkColours = new Queue<Color>();
+        private Dictionary<long, Color> iSharedChunkColourDictionary = new Dictionary<long, Color>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/LargestCells.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Runtime.InteropServices;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+
+namespace HeapComparisonLib.CSV.Comparers
+{
+    internal class LargestCells : ComparerBase
+	{
+		#region Constructors & destructor
+		public LargestCells( Worksheet aSheet, string aFileName1, string aFileName2 )
+		:	base( aSheet, aFileName1, aFileName2 )
+		{
+		}
+		#endregion
+
+		#region API
+		public override void PrepareWorksheetReadyForData()
+		{
+			Sheet.Name = "Largest Cells by Type";
+			//
+			Range r = null;
+			//
+			Utils.SetValue( Row,  1, Sheet, "Thread" );
+			r = Utils.SetValue( Row,  2, Sheet, "Largest Free Cell Size" );
+			r.AddComment( FileName1 );
+			r = Utils.SetValue( Row,  3, Sheet, "Largest Free Cell Size" );
+			r.AddComment( FileName2 );
+			Utils.SetValue( Row,  4, Sheet, "Delta" );
+			//
+			Utils.SetValue( Row,  5, Sheet, " " );
+			//
+			r = Utils.SetValue( Row,  6, Sheet, "Largest Alloc Cell Size" );
+			r.AddComment( FileName1 );
+			r = Utils.SetValue( Row,  7, Sheet, "Largest Alloc Cell Size" );
+			r.AddComment( FileName2 );
+			Utils.SetValue( Row,  8, Sheet, "Delta" );
+			//
+			Utils.MakeBoxedTitleRow( Row, 8, Sheet, 0xFF0000 );
+			//
+			NextRow();
+			NextRow();
+		}
+
+		public override void FinaliseWorksheet()
+		{
+			Utils.AutoFitColumn( 1, Sheet, 70.0 );
+			for( int col=2; col<=8; col++ )
+			{
+				Utils.AutoFitColumn( col, Sheet );
+			}
+		}
+
+        public override void Compare( CSVThread aMaster, CSVThread aOther )
+		{
+            Utils.SetValue( Row, 1, Sheet, aMaster.FullName );
+			//
+			if	( aMaster.IsDefault || aOther.IsDefault )
+			{
+				Utils.GetRangeByColumnAndRow( Row, 1, Row, 1, Sheet ).Font.Bold = true;
+			}
+			//
+			CompareAndWriteItems( aMaster, aMaster.FreeCellLargest, aOther, aOther.FreeCellLargest,  2, 0xFF0000, 0x0000FF );
+			CompareAndWriteItems( aMaster, aMaster.AllocCellLargest, aOther, aOther.AllocCellLargest, 6, 0x0000FF, 0xFF0000 );
+			//
+			NextRow();
+		}
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Comparers/SlackSpace.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Runtime.InteropServices;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+
+namespace HeapComparisonLib.CSV.Comparers
+{
+    internal class SlackSpace : ComparerBase
+	{
+		#region Constructors & destructor
+		public SlackSpace( Worksheet aSheet, string aFileName1, string aFileName2 )
+		:	base( aSheet, aFileName1, aFileName2 )
+		{
+		}
+		#endregion
+
+		#region API
+		public override string DeltaFormula( int aIndex )
+		{
+			int column = 4;
+			return Utils.MakeSummationFormula( 3, Row - 2, column, Sheet );
+		}
+
+		public override void PrepareWorksheetReadyForData()
+		{
+			Sheet.Name = "Slack Space";
+			//
+			Range r = null;
+			//
+			Utils.SetValue( Row, 1, Sheet, "Thread" );
+			r = Utils.SetValue( Row, 2, Sheet, "Slack Space" );
+			r.AddComment( FileName1 );
+			r = Utils.SetValue( Row, 3, Sheet, "Slack Space" );
+			r.AddComment( FileName2 );
+			Utils.SetValue( Row, 4, Sheet, "Delta" );
+			//
+			Utils.MakeBoxedTitleRow( Row, 4, Sheet, 0xFF0000 );
+			//
+			NextRow();
+			NextRow();
+		}
+
+		public override void FinaliseWorksheet()
+		{
+			// Make totals
+			NextRow();
+			Utils.SetValue( Row, 1, Sheet, "Totals:" );
+			Utils.SetValue( Row, 2, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 2) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 2) + ")" );
+			Utils.SetValue( Row, 3, Sheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( 3, 3) + ":" + Utils.ColumnAndRowAsExcelIdentifier( Row - 2, 3) + ")" );
+			Utils.SetValue( Row, 4, Sheet, DeltaFormula( 0 ) );
+			Utils.BoldRow( Row, Sheet );
+
+			// Calculate column sizes
+			Utils.AutoFitColumn( 1, Sheet, 70.0 );
+			Utils.AutoFitColumn( 2, Sheet );
+			Utils.AutoFitColumn( 3, Sheet );
+			Utils.AutoFitColumn( 4, Sheet );
+		}
+
+        public override void Compare( CSVThread aMaster, CSVThread aOther )
+		{
+            Utils.SetValue( Row, 1, Sheet, aMaster.FullName );
+
+			if	( !aMaster.IsDefault )
+				Utils.SetValue( Row, 2, Sheet, aMaster.FreeSpaceSlack.ToString() );
+			if	( !aOther.IsDefault )
+				Utils.SetValue( Row, 3, Sheet, aOther.FreeSpaceSlack.ToString() );
+			//
+			if	( aMaster.IsDefault || aOther.IsDefault )
+			{
+				Utils.GetRangeByColumnAndRow( Row, 1, Row, 1, Sheet ).Font.Bold = true;
+			}
+
+			long delta = aMaster.FreeSpaceSlack - aOther.FreeSpaceSlack;
+			Utils.SetValue( Row, 4, Sheet, ( delta * -1).ToString() );
+
+			// Colourise line according to difference
+			int colour = 0x000000; // black
+			if	( aOther.FreeSpaceSlack > aMaster.FreeSpaceSlack )
+			{
+				colour = 0x0000FF; // red
+			}
+			else if ( aOther.FreeSpaceSlack < aMaster.FreeSpaceSlack )
+			{
+				colour = 0xFF0000; // blue
+			}
+			Utils.SetRangeFontColour( Row, 4, Row, 4, Sheet, colour );
+			//
+			NextRow();
+		}
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/DataSet/CSVDataSet.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,206 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+	internal class CSVDataSet : IComparer<CSVThread>
+	{
+		#region Constructors & destructor
+        public CSVDataSet( string aFileName, long aLineNumber )
+        {
+            iOriginalFileName = aFileName;
+            iLineNumber = aLineNumber;
+        }
+
+        public CSVDataSet( CSVDataSet aCopy )
+        {
+            iOriginalFileName = aCopy.OriginalFileName;
+            iLineNumber = aCopy.LineNumber;
+
+            foreach ( KeyValuePair<string, CSVThread> kvp in aCopy.iEntries )
+            {
+                iEntries.Add( kvp.Key, kvp.Value );
+            }
+        }
+		#endregion
+
+		#region API
+        public void Add( CSVThread aThread )
+        {
+            if ( !iEntries.ContainsKey( aThread.FullName ) )
+            {
+                iEntries.Add( aThread.FullName, aThread );
+            }
+        }
+
+        public void Remove( CSVThread aThread )
+        {
+            if ( aThread.FullName != string.Empty && iEntries.ContainsKey( aThread.FullName ) )
+            {
+                iEntries.Remove( aThread.FullName );
+            }
+        }
+
+		public void RemoveByThreadName( string aName )
+		{
+			if	( iEntries[ aName ] != null )
+			{
+				iEntries.Remove( aName );
+			}
+		}
+
+        public void FindSharedHeaps()
+        {
+            foreach ( KeyValuePair<string, CSVThread> kvp in iEntries )
+            {
+                LookForOtherUsesOfChunkHandle( kvp.Value );
+            }
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iEntries.Count; }
+        }
+
+        public string OriginalFileName
+        {
+            get { return iOriginalFileName; }
+        }
+
+        public string FileNameAndPath
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                //
+                ret.Append( Path.GetDirectoryName( iOriginalFileName ) + Path.DirectorySeparatorChar );
+                ret.Append( Path.GetFileNameWithoutExtension( iOriginalFileName ) );
+                ret.AppendFormat( "_{0:d8}{1}", LineNumber, Path.GetExtension( iOriginalFileName ) );
+                //
+                return ret.ToString(); 
+            }
+        }
+
+        public string FileName
+        {
+            get
+            {
+                return Path.GetFileNameWithoutExtension( FileNameAndPath );
+            }
+        }
+
+        public long LineNumber
+        {
+            get { return iLineNumber; }
+        }
+
+        public long TimeStamp
+        {
+            get { return iTimeStamp; }
+            set { iTimeStamp = value; }
+        }
+
+        public CSVThread this[ string aName ]
+		{
+            get
+            {
+                CSVThread ret = null;
+                //
+                if ( iEntries.ContainsKey( aName ) )
+                {
+                    ret = iEntries[ aName ];
+                }
+                //
+                return ret;
+            }
+		}
+
+        public CSVThread this[ int aIndex ]
+        {
+            get
+            {
+                string thread = iEntries.Keys[ aIndex ];
+                return this[ thread ];
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void LookForOtherUsesOfChunkHandle( CSVThread aMaster )
+        {
+            if ( aMaster.Version != CSVThread.TFileFormatVersion.EFileFormatVersion1 )
+            {
+                foreach ( KeyValuePair<string, CSVThread> kvp in iEntries )
+                {
+                    CSVThread thread = kvp.Value;
+                    if ( thread != aMaster )
+                    {
+                        if ( thread.ChunkHandle == aMaster.ChunkHandle )
+                        {
+                            thread.IsSharedHeap = true;
+                            thread.AddThreadWithCommonHeapChunkHandle( aMaster );
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region IComparer Members
+        public int Compare( CSVThread aLeft, CSVThread aRight )
+		{
+            return aLeft.FullName.CompareTo( aRight.FullName );
+		}
+		#endregion
+
+		#region Data members
+		private string iOriginalFileName = string.Empty;
+        private long iLineNumber;
+        private long iTimeStamp;
+        private SortedList<string, CSVThread> iEntries = new SortedList<string, CSVThread>();
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/DataSet/CSVDataSetCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVDataSetCollection
+	{
+		#region Constructors & destructor
+        public CSVDataSetCollection()
+        {
+        }
+		#endregion
+
+		#region API
+        internal void Remove( int aIndex )
+        {
+            iDataSets.RemoveAt( aIndex );
+        }
+
+        internal void RemoveEmptyDataSets()
+        {
+            for ( int i = iDataSets.Count - 1; i >= 0; i-- )
+            {
+                CSVDataSet set = iDataSets[ i ];
+                if ( set.Count == 0 )
+                {
+                    iDataSets.RemoveAt( i );
+                }
+            }
+        }
+
+		internal void Add( CSVDataSet aDataSet )
+		{
+            iDataSets.Add( aDataSet );
+		}
+
+        internal bool Contains( CSVDataSet aDataSet )
+        {
+            Predicate<CSVDataSet> findByFileAndLine = delegate( CSVDataSet setToCheck )
+            {
+                return ( setToCheck.FileName == aDataSet.FileName ) &&
+                       ( setToCheck.LineNumber == aDataSet.LineNumber );
+            };
+
+            bool ret = iDataSets.Exists( findByFileAndLine );
+            return ret;
+        }
+
+        internal void SortByTimestamp()
+        {
+            Comparison<CSVDataSet> comparer = delegate( CSVDataSet aLeft, CSVDataSet aRight )
+            {
+                int ret = -1;
+                //
+                if ( aLeft.TimeStamp == aRight.TimeStamp )
+                {
+                    ret = 0;
+                }
+                else if ( aLeft.TimeStamp > aRight.TimeStamp )
+                {
+                    ret = 1;
+                }
+                //
+                return ret;
+            };
+
+            iDataSets.Sort( comparer );
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iDataSets.Count; }
+        }
+
+        public CSVDataSet this[ int aIndex ]
+		{
+            get
+            {
+			    return iDataSets[ aIndex ];
+            }
+        }
+        #endregion
+
+		#region Data members
+        private List<CSVDataSet> iDataSets = new List<CSVDataSet>();
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Engine/CSVComparisonEngine.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,417 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+	public class CSVComparisonEngine
+	{
+        #region Events
+        public enum TEvent
+        {
+            // Reported as events
+            EEventOperationStarted = 0,
+            EEventOperationComplete,
+
+            // Reported as percentage progress
+            EEventSplittingProgress,
+            EEventComparingProgress,
+
+            // Reported as indexed progress
+            EEventSplittingMovedToNewFile,
+            EEventComparingMovedToNewDataSet,
+        }
+
+        public delegate void PercentageProgressHandler( TEvent aEvent, CSVComparisonEngine aSender, int aProgressPercent );
+        public event PercentageProgressHandler ePercentageProgressHandler;
+
+        public delegate void IndexedProgressHandler( TEvent aEvent, CSVComparisonEngine aSender, int aCurrentIndex, int aMaxIndex );
+        public event IndexedProgressHandler eIndexedProgressHandler;
+
+        public delegate void EventHandler( TEvent aEvent, CSVComparisonEngine aSender );
+        public event EventHandler eEventHandler;
+
+        public delegate void ExceptionHandler( string aTitle, string aBody );
+        public event ExceptionHandler eExceptionHandler;
+        #endregion
+
+        #region Constructors & destructor
+        public CSVComparisonEngine( List<string> aSource, string aDestinationPath )
+        {
+            iSource.AddRange( aSource );
+            iDestinationPath = aDestinationPath;
+        }
+		#endregion
+
+		#region API
+        public void CompareAsync()
+        {
+            iIndex = 0;
+            iState = TState.EStateIdle;
+
+            // Start things off...
+            OnStateSplitting();
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iDataSets.Count; }
+        }
+        #endregion
+        
+        #region Internal state related
+        private enum TState
+        {
+            EStateIdle = 0,
+            EStateSplittingLogs,
+            EStateComparingAndExportingIndividualDataSets,
+            EStateComparingAllDataSets,
+            EStateFinished
+        }
+
+        private void OnStateSplitting()
+        {
+            // If we have more files to split, then kick off
+            // a new splitter.
+            if ( iIndex < iSource.Count )
+            {
+                string fileName = iSource[ iIndex ];
+                if ( eIndexedProgressHandler != null )
+                {
+                    eIndexedProgressHandler( TEvent.EEventSplittingMovedToNewFile, this, iIndex + 1, iSource.Count );
+                }
+
+                // Move to next file
+                iIndex++;
+
+                // Set up next worker
+                iWorkerSplitter = new CSVWorkerLogSplitter( fileName, iDataSets );
+                iWorkerSplitter.iObserver += new AsyncReaderBase.Observer( WorkerSplitter_Observer );
+                iWorkerSplitter.SplitAsync();
+                //
+                ChangeState( TState.EStateSplittingLogs );
+            }
+            else
+            {
+                // Done with splitting phase, move on to comparing.
+                // We must have at least two sets, or else there's nothing
+                // to compare.
+                if ( iDataSets.Count <= 1 )
+                {
+                    if ( eExceptionHandler != null )
+                    {
+                        eExceptionHandler( "Nothing to compare", "There are insufficient data sets to compare." );
+                    }
+
+                    ChangeState( TState.EStateFinished );
+                }
+                else
+                {
+                    // Next, find the shared chunks
+                    IdentifySharedHeaps();
+
+                    // And now start to export
+                    iIndex = 0;
+                    if ( iWorkerSplitter != null )
+                    {
+                        iWorkerSplitter.Dispose();
+                        iWorkerSplitter = null;
+                    }
+
+                    ChangeState( TState.EStateComparingAndExportingIndividualDataSets );
+                    OnStateComparingAndExportingIndividualDataSets();
+                }
+            }
+        }
+
+        private void OnStateComparingAndExportingIndividualDataSets()
+        {
+            // If there are only two sets to compare, then we generate a single output file and that's it.
+            // If we have 3 (or more) data sets, then we will generate three (or more) comparison files, e.g.:
+            //
+            // [File 1]    0 vs 1
+            // [File 2]    1 vs 2
+            // 
+            // and also
+            // 
+            // [File 3]    0 vs 2
+            //
+            // Etc.
+            int numberOfComparisons = ( iDataSets.Count > 2 ? iDataSets.Count : 1 );
+
+            if ( iIndex + 1 < iDataSets.Count )
+            {
+                if ( eIndexedProgressHandler != null )
+                {
+                    eIndexedProgressHandler( TEvent.EEventComparingMovedToNewDataSet, this, iIndex + 1, numberOfComparisons );
+                }
+
+                // Get sets to compare
+                CSVDataSet set1 = iDataSets[ iIndex + 0 ];
+                CSVDataSet set2 = iDataSets[ iIndex + 1 ];
+                
+                // Build excel file name
+                string excelFileName = BuildExcelFileNameForTwoSetComparison();
+
+                // Since we've now built the filename it's okay to increment the index
+                ++iIndex;
+ 
+                // Create and initiate comparison
+                iWorkerComparatorTwo = new CSVWorkerTwoDataSetComparator( set1, set2, excelFileName );
+                iWorkerComparatorTwo.eObserver += new CSVWorkerTwoDataSetComparator.Observer( WorkerComparatorTwo_Observer );
+                iWorkerComparatorTwo.CompareAndSaveAsync();
+
+                ChangeState( TState.EStateComparingAndExportingIndividualDataSets );
+            }
+            else
+            {
+                // Special comparison of first vs last set when comparing
+                // more than two data sets
+                if ( iDataSets.Count > 2 )
+                {
+                    if ( eIndexedProgressHandler != null )
+                    {
+                        eIndexedProgressHandler( TEvent.EEventComparingMovedToNewDataSet, this, numberOfComparisons, numberOfComparisons );
+                    }
+
+                    // Special value to indicate first vs last comparison
+                    iIndex = KSpecialFirstVsLastComparisonIndex;
+
+                    // Get sets to compare
+                    CSVDataSet set1 = iDataSets[ 0 ];
+                    CSVDataSet set2 = iDataSets[ iDataSets.Count - 1 ];
+
+                    // Build excel file name
+                    string excelFileName = BuildExcelFileNameForTwoSetComparison();
+
+                    // Create and initiate comparison
+                    if ( iWorkerComparatorTwo != null )
+                    {
+                        iWorkerComparatorTwo.Dispose();
+                        iWorkerComparatorTwo = null;
+                    }
+
+                    iWorkerComparatorTwo = new CSVWorkerTwoDataSetComparator( set1, set2, excelFileName );
+                    iWorkerComparatorTwo.eObserver += new CSVWorkerTwoDataSetComparator.Observer( WorkerComparatorTwo_Observer );
+                    iWorkerComparatorTwo.CompareAndSaveAsync();
+
+                    ChangeState( TState.EStateComparingAndExportingIndividualDataSets );
+                }
+                else
+                {
+                    if ( iWorkerComparatorTwo != null )
+                    {
+                        iWorkerComparatorTwo.Dispose();
+                        iWorkerComparatorTwo = null;
+                    }
+                    //
+                    ChangeState( TState.EStateComparingAllDataSets );
+                    OnStateComparingAndExportingAllDataSets();
+                }
+            }
+        }
+
+        private void OnStateComparingAndExportingAllDataSets()
+        {
+            // Create and initiate comparison
+            string excelFileName = BuildExcelFileNameForSummarySpreadsheet();
+            iWorkerComparatorAll = new CSVWorkerAllDataSetComparator( iDataSets, excelFileName );
+            iWorkerComparatorAll.eObserver += new CSVWorkerAllDataSetComparator.Observer( WorkerComparatorAll_Observer );
+            iWorkerComparatorAll.CompareAndSaveAsync();
+
+            ChangeState( TState.EStateComparingAllDataSets );
+        }
+        #endregion
+
+        #region Event handlers
+        void WorkerSplitter_Observer( AsyncReaderBase.TEvent aEvent, AsyncReaderBase aSender )
+        {
+            switch ( aEvent )
+            {
+            case AsyncReaderBase.TEvent.EReadingStarted:
+                break;
+            case AsyncReaderBase.TEvent.EReadingProgress:
+                if ( ePercentageProgressHandler != null )
+                {
+                    ePercentageProgressHandler( TEvent.EEventSplittingProgress, this, aSender.Progress );
+                }
+                break;
+            case AsyncReaderBase.TEvent.EReadingComplete:
+                OnStateSplitting();
+                break;
+            }
+        }
+
+        void WorkerComparatorTwo_Observer( CSVWorkerTwoDataSetComparator.TEvent aEvent, string aThreadName )
+        {
+            switch ( aEvent )
+            {
+            case CSVWorkerTwoDataSetComparator.TEvent.EExportingStarted:
+                break;
+            case CSVWorkerTwoDataSetComparator.TEvent.EExportingProgress:
+                if ( ePercentageProgressHandler != null )
+                {
+                    ePercentageProgressHandler( TEvent.EEventComparingProgress, this, iWorkerComparatorTwo.Progress );
+                }
+                break;
+            case CSVWorkerTwoDataSetComparator.TEvent.EExportingComplete:
+                if ( iIndex >= iDataSets.Count )
+                {
+                    OnStateComparingAndExportingAllDataSets();
+                }
+                else
+                {
+                    OnStateComparingAndExportingIndividualDataSets();
+                }
+                break;
+            }
+        }
+
+        void WorkerComparatorAll_Observer( CSVWorkerAllDataSetComparator.TEvent aEvent )
+        {
+            switch ( aEvent )
+            {
+            case CSVWorkerAllDataSetComparator.TEvent.EExportingStarted:
+                break;
+            case CSVWorkerAllDataSetComparator.TEvent.EExportingProgress:
+                if ( ePercentageProgressHandler != null )
+                {
+                    ePercentageProgressHandler( TEvent.EEventComparingProgress, this, iWorkerComparatorAll.Progress );
+                }
+                break;
+            case CSVWorkerAllDataSetComparator.TEvent.EExportingComplete:
+                ChangeState( TState.EStateFinished );
+                break;
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void ChangeState( TState aNewState )
+        {
+            if ( eEventHandler != null )
+            {
+                if ( iState == TState.EStateIdle )
+                {
+                    eEventHandler( TEvent.EEventOperationStarted, this );
+                }
+                else if ( aNewState == TState.EStateFinished )
+                {
+                    eEventHandler( TEvent.EEventOperationComplete, this );
+                }
+            }
+
+            iState = aNewState;
+        }
+
+        private string BuildExcelFileNameForTwoSetComparison()
+        {
+            StringBuilder temp = new StringBuilder( iDestinationPath );
+            if ( iDestinationPath[ iDestinationPath.Length - 1 ] != Path.DirectorySeparatorChar )
+            {
+                temp.Append( Path.DirectorySeparatorChar );
+            }
+
+            // Special case for first vs last
+            if ( iIndex == KSpecialFirstVsLastComparisonIndex )
+            {
+                temp.AppendFormat( "Comparison ({0:d3} vs {1:d3}).xls", 1, iDataSets.Count );
+            }
+            else
+            {
+                temp.AppendFormat( "Comparison ({0:d3} vs {1:d3}).xls", iIndex + 1, iIndex + 2 );
+            }
+
+            return temp.ToString();
+        }
+
+        private string BuildExcelFileNameForSummarySpreadsheet()
+        {
+            StringBuilder temp = new StringBuilder( iDestinationPath );
+            if ( iDestinationPath[ iDestinationPath.Length - 1 ] != Path.DirectorySeparatorChar )
+            {
+                temp.Append( Path.DirectorySeparatorChar );
+            }
+            temp.Append( "Summary.xls" );
+            return temp.ToString();
+        }
+
+        private int CalculateProgressPercentage( int aCurrent, int aMax )
+        {
+            float ret = (float) aCurrent / (float) aMax;
+            ret *= 100.0f;
+            return (int) ret;
+        }
+
+        private void IdentifySharedHeaps()
+        {
+            // MemSpy should (and could) do this, at least eventually, but for now
+            // we'll work this out on the PC if MemSpy supplied us with the chunk handles for
+            // each thread.
+            int count = iDataSets.Count;
+            for ( int i = 0; i < count; i++ )
+            {
+                CSVDataSet dataSet = iDataSets[ i ];
+                dataSet.FindSharedHeaps();
+            }
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KSpecialFirstVsLastComparisonIndex = int.MaxValue;
+        #endregion
+
+        #region Data members
+        private readonly string iDestinationPath;
+        private List<string> iSource = new List<string>();
+        private CSVDataSetCollection iDataSets = new CSVDataSetCollection();
+        private int iIndex = 0;
+        private TState iState = TState.EStateIdle;
+        private CSVWorkerLogSplitter iWorkerSplitter;
+        private CSVWorkerTwoDataSetComparator iWorkerComparatorTwo;
+        private CSVWorkerAllDataSetComparator iWorkerComparatorAll;
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Excel/CSVExcelExporterAllDataSets.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,495 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Threading;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using Excel = Microsoft.Office.Interop.Excel;
+using System.Reflection; 
+using SymbianExcelUtils;
+using SymbianUtils;
+using SymbianUtils.Range;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVExcelExporterAllDataSets : DisposableObject
+    {
+        #region Constructors & destructor
+        public CSVExcelExporterAllDataSets( string aOutputFileName, SortedDictionary<long, string> aThreadMap, int aDataSetCount )
+        {
+            iDataSetCount = aDataSetCount;
+            iFileName = aOutputFileName;
+
+            // Sort the aThreadMap list by thread name, rather than id.
+            SortedDictionary<string, TThreadMapEntry> temp = new SortedDictionary<string, TThreadMapEntry>();
+            foreach ( KeyValuePair<long, string> kvp in aThreadMap )
+            {
+                TThreadMapEntry entry = new TThreadMapEntry();
+                entry.iThreadName = kvp.Value;
+                entry.iThreadId = kvp.Key;
+                //
+                string mungedName = string.Format( "{1} [{0:d5}]", kvp.Key, kvp.Value );
+                temp.Add( mungedName, entry );
+            }
+
+            // Now build new list, in the right order
+            iThreadMap = new Dictionary<long, TThreadMapEntry>( temp.Count + 1 );
+            foreach ( KeyValuePair<string, TThreadMapEntry> kvp in temp )
+            {
+                iThreadMap.Add( kvp.Value.iThreadId, kvp.Value );
+            }
+  
+            // Open up excel
+            iExcelApp = new Excel.Application();
+            if ( iExcelApp != null )
+            {
+                iExcelApp.Visible = false;
+                iExcelApp.DisplayAlerts = false;
+
+                // Prepare sheets
+                PrepareWorksheetReadyForData();
+            }
+            else
+            {
+                throw new Exception( "Microsoft Excel not available" );
+            }
+        }
+        #endregion
+
+        #region API
+        public void Export( CSVDataSet aSet )
+        {
+            int count = aSet.Count;
+            for ( int i = 0; i < count; i++ )
+            {
+                CSVThread thread = aSet[ i ];
+
+                // find row
+                if ( iThreadMap.ContainsKey( thread.ThreadId ) )
+                {
+                    TThreadMapEntry entry = iThreadMap[ thread.ThreadId ];
+
+                    Utils.SetValue( entry.iRowIndex, iColumnCounter, iSheetChunkSize, thread.SizeCurrent.ToString() );
+                    Utils.SetValue( entry.iRowIndex, iColumnCounter, iSheetAlloc, thread.AllocSpaceTotal.ToString() );
+                    Utils.SetValue( entry.iRowIndex, iColumnCounter, iSheetFree, thread.FreeSpaceTotal.ToString() );
+
+                    // Update stats
+                    ++entry.iNumberOfMatchingDataSets;
+                    
+                    // Min & max for each type
+                    entry.iRangeChunk.UpdateMin( thread.SizeCurrent );
+                    entry.iRangeChunk.UpdateMax( thread.SizeCurrent );
+                    entry.iRangeAlloc.UpdateMin( thread.AllocSpaceTotal );
+                    entry.iRangeAlloc.UpdateMax( thread.AllocSpaceTotal );
+                    entry.iRangeFree.UpdateMin( thread.FreeSpaceTotal );
+                    entry.iRangeFree.UpdateMax( thread.FreeSpaceTotal );
+
+                    // Delta for each type
+                    long deltaChunk = entry.iLastChunk > 0 ? ( thread.SizeCurrent - entry.iLastChunk ) : 0;
+                    long deltaAlloc = entry.iLastAlloc > 0 ? ( thread.AllocSpaceTotal - entry.iLastAlloc ) : 0;
+                    long deltaFree = entry.iLastFree > 0 ? ( thread.FreeSpaceTotal - entry.iLastFree ) : 0;
+                    entry.iDeltaChunk += deltaChunk;
+                    entry.iDeltaAlloc += deltaAlloc;
+                    entry.iDeltaFree += deltaFree;
+
+                    // Net effect
+                    entry.iNetEffectChunk += CSVExcelExporterAllDataSets.NetEffectForDelta( deltaChunk );
+                    entry.iNetEffectAlloc += CSVExcelExporterAllDataSets.NetEffectForDelta( deltaAlloc );
+                    entry.iNetEffectFree += CSVExcelExporterAllDataSets.NetEffectForDelta( deltaFree );
+
+                    // Update last values
+                    entry.iLastChunk = thread.SizeCurrent;
+                    entry.iLastAlloc = thread.AllocSpaceTotal;
+                    entry.iLastFree = thread.FreeSpaceTotal;
+                }
+                else
+                {
+                    throw new Exception( "Cannot find thread entry for thread named: " + thread.ThreadName );
+                }
+            }
+
+            ++iColumnCounter;
+        }
+        #endregion
+
+        #region From DisposableObject
+        protected override void CleanupManagedResources()
+        {
+            try
+            {
+                if ( iExcelApp != null )
+                {
+                    // We're finished
+                    PrepareWorsheetForSaving();
+
+                    // Save excel workbook
+                    SaveWorkbook();
+
+                    // Close app
+                    Utils.CloseExcel( iExcelApp );
+                }
+
+                iExcelApp = null;
+            }
+            finally
+            {
+                base.CleanupManagedResources();
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void PrepareWorksheetReadyForData( )
+        {
+            Excel.Workbooks workbooks = iExcelApp.Workbooks;
+            workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet);
+            Excel.Workbook workbook = workbooks.get_Item(workbooks.Count);
+            Excel.Sheets sheets = workbook.Worksheets;
+
+            iSheetChunkSize = (Excel.Worksheet) sheets.get_Item( 1 );
+            CreateSheet( iSheetChunkSize, "Chunk Size" );
+
+            iSheetFree = (Excel.Worksheet) sheets.Add( Type.Missing, sheets.get_Item( sheets.Count ), 1, Excel.XlSheetType.xlWorksheet );
+            CreateSheet( iSheetFree, "Free Size" );
+
+            iSheetAlloc = (Excel.Worksheet) sheets.Add( Type.Missing, sheets.get_Item( sheets.Count ), 1, Excel.XlSheetType.xlWorksheet );
+            CreateSheet( iSheetAlloc, "Alloc Size" );
+        }
+
+        private void PrepareWorsheetForSaving()
+        {
+            // Update all sheets change factors...
+            CalculateChangeFactor( iSheetChunkSize, TThreadMapEntry.TType.ETypeChunk );
+            CalculateChangeFactor( iSheetAlloc, TThreadMapEntry.TType.ETypeAlloc );
+            CalculateChangeFactor( iSheetFree, TThreadMapEntry.TType.ETypeFree );
+
+            // Deltas
+            CalculateDelta( iSheetChunkSize, TThreadMapEntry.TType.ETypeChunk );
+            CalculateDelta( iSheetAlloc, TThreadMapEntry.TType.ETypeAlloc );
+            CalculateDelta( iSheetFree, TThreadMapEntry.TType.ETypeFree );
+ 
+            // Sort
+            SortByChangeFactor( iSheetChunkSize );
+            SortByChangeFactor( iSheetAlloc );
+            SortByChangeFactor( iSheetFree );
+
+            iSheetAlloc.Activate();
+        }
+
+        private void CreateSheet( Excel.Worksheet aSheet, string aTitle )
+        {
+            aSheet.Name = aTitle;
+            
+            // Create standard columns
+            Utils.SetValue( 1, KColumnNumberThreadName, aSheet, "Thread Name" );
+            Utils.SetValue( 1, KColumnNumberChangeFactor, aSheet, "Change Factor" );
+            Utils.SetValue( 1, KColumnNumberDelta, aSheet, "Overall Delta" );
+
+            // Set up column formatting
+            Utils.FormatColumn( KColumnNumberChangeFactor, aSheet, KColumnNumberFormatChangeFactor );
+            Utils.FormatColumn( KColumnNumberDelta, aSheet, KColumnNumberFormatDelta );
+
+            for ( int i = 0; i < iDataSetCount; i++ )
+            {
+                int col = i + KColumnNumberCycleFirst;
+                Utils.SetValue( 1, col, aSheet, string.Format( "Cycle {0:d}", i + 1 ) );
+                Utils.FormatColumn( col, aSheet, KColumnNumberFormatCycle );
+            }
+
+            Utils.MakeBoxedTitleRow( 1, KColumnNumberCycleFirst + iDataSetCount, aSheet, 0xFF0000 );
+
+            // Add thread names & ids
+            int row = 2;
+            foreach ( KeyValuePair<long, TThreadMapEntry> kvp in iThreadMap )
+            {
+                TThreadMapEntry entry = kvp.Value;
+                Utils.SetValue( row, KColumnNumberThreadName, aSheet, string.Format( "[{0:d5}] {1}", kvp.Key, kvp.Value.iThreadName ) );
+                if ( entry.iRowIndex == 0 )
+                {
+                    entry.iRowIndex = row;
+                }
+                ++row;
+            }
+
+            // Size columns
+            Utils.AutoFitColumn( KColumnNumberThreadName, aSheet );
+            Utils.SetColumnWidth( KColumnNumberChangeFactor, aSheet, 15 );
+            Utils.SetColumnWidth( KColumnNumberDelta, aSheet, 15 );
+        }
+
+        private void SaveWorkbook()
+        {
+            string path = Path.GetDirectoryName( iFileName );
+            System.IO.DirectoryInfo dirInfo = new System.IO.DirectoryInfo( path );
+            if ( !dirInfo.Exists )
+            {
+                dirInfo.Create();
+            }
+
+            System.IO.FileInfo fileInfo = new System.IO.FileInfo( iFileName );
+            if ( fileInfo.Exists )
+            {
+                try
+                {
+                    fileInfo.Delete();
+                }
+                catch ( Exception )
+                {
+                }
+            }
+
+            Microsoft.Office.Interop.Excel.Workbooks workbooks = iExcelApp.Workbooks;
+            Microsoft.Office.Interop.Excel.Workbook workbook = workbooks.get_Item( workbooks.Count );
+
+            try
+            {
+                workbook.SaveAs( iFileName,
+                                    Excel.XlFileFormat.xlExcel9795,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Excel.XlSaveAsAccessMode.xlNoChange,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing );
+            }
+            catch ( System.IO.IOException )
+            {
+            }
+
+            workbook.Close( false, Type.Missing, Type.Missing );
+        }
+
+        private void SortByChangeFactor( Excel.Worksheet aSheet )
+        {
+            int colCount = KColumnNumberCycleFirst + iDataSetCount;
+            
+            Excel.Range masterSortCell = (Excel.Range) aSheet.Cells[ 1, KColumnNumberChangeFactor ];
+            Excel.Range range = Utils.GetRangeByColumnAndRow( 1, KColumnNumberThreadName, 1 + iThreadMap.Count, colCount, aSheet );
+            range.Sort( masterSortCell.Columns[ 1, Type.Missing ], Microsoft.Office.Interop.Excel.XlSortOrder.xlDescending,
+                        Type.Missing, Type.Missing, Microsoft.Office.Interop.Excel.XlSortOrder.xlAscending, 
+                        Type.Missing, Microsoft.Office.Interop.Excel.XlSortOrder.xlAscending, Microsoft.Office.Interop.Excel.XlYesNoGuess.xlYes,
+                        Type.Missing, Type.Missing,
+                        Microsoft.Office.Interop.Excel.XlSortOrientation.xlSortColumns,
+                        Microsoft.Office.Interop.Excel.XlSortMethod.xlPinYin,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal );
+        }
+
+        private void CalculateChangeFactor( Excel.Worksheet aSheet, TThreadMapEntry.TType aType )
+        {
+            aSheet.Activate();
+
+            foreach ( KeyValuePair<long, TThreadMapEntry> kvp in iThreadMap )
+            {
+                TThreadMapEntry entry = kvp.Value;
+                //
+                string formula = entry.ChangeFactor( aType );
+                Utils.SetValue( entry.iRowIndex, KColumnNumberChangeFactor, aSheet, formula );
+            }
+        }
+
+        private void CalculateDelta( Excel.Worksheet aSheet, TThreadMapEntry.TType aType )
+        {
+            aSheet.Activate();
+
+            foreach ( KeyValuePair<long, TThreadMapEntry> kvp in iThreadMap )
+            {
+                TThreadMapEntry entry = kvp.Value;
+                //
+                string formula = entry.Delta( aType );
+                Utils.SetValue( entry.iRowIndex, KColumnNumberDelta, aSheet, formula );
+            }
+        }
+
+        private static int NetEffectForDelta( long aDelta )
+        {
+            int ret = -1;
+            //
+            if ( aDelta > 0 )
+            {
+                ret = 1;
+            }
+            else if ( aDelta == 0 )
+            {
+                ret = 0;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KColumnNumberThreadName = 1;
+        private const int KColumnNumberChangeFactor = 2;
+        private const int KColumnNumberDelta = 3;
+
+        private const int KColumnNumberCycleFirst = 5;
+
+        private const string KColumnNumberFormatDelta = "[Red]###,###,##0;[Blue]-###,###,##0";
+        private const string KColumnNumberFormatCycle = "###,###,##0";
+        private const string KColumnNumberFormatChangeFactor = "[Red]#,##0.000000;[Blue]-#,##0.000000";
+        #endregion
+
+        #region Data members
+        private readonly string iFileName;
+        private readonly int iDataSetCount;
+        private readonly Dictionary<long, TThreadMapEntry> iThreadMap;
+        private Excel.Worksheet iSheetFree;
+        private Excel.Worksheet iSheetAlloc;
+        private Excel.Worksheet iSheetChunkSize;
+        private Excel.Application iExcelApp;
+        private int iColumnCounter = KColumnNumberCycleFirst;
+        #endregion
+    }
+
+    #region Internal class
+    internal class TThreadMapEntry
+    {
+        #region Enumerations
+        public enum TType
+        {
+            ETypeChunk = 0,
+            ETypeAlloc,
+            ETypeFree
+        }
+        #endregion
+
+        #region API
+        public string ChangeFactor( TType aType )
+        {
+            string ret = string.Empty;
+            //
+            if ( aType == TType.ETypeChunk )
+            {
+                ret = ChangeFactor( iNetEffectChunk, iDeltaChunk, iRangeChunk );
+            }
+            else if ( aType == TType.ETypeAlloc )
+            {
+                ret = ChangeFactor( iNetEffectAlloc, iDeltaAlloc, iRangeAlloc );
+            }
+            else if ( aType == TType.ETypeFree )
+            {
+                ret = ChangeFactor( iNetEffectFree, iDeltaFree, iRangeFree );
+            }
+            //
+            return ret;
+        }
+
+        public string Delta( TType aType )
+        {
+            string ret = string.Empty;
+            //
+            if ( aType == TType.ETypeChunk )
+            {
+                ret = ( iDeltaChunk != 0 ) ? "=" + iDeltaChunk.ToString() : string.Empty;
+            }
+            else if ( aType == TType.ETypeAlloc )
+            {
+                ret = ( iDeltaAlloc != 0 ) ? "=" + iDeltaAlloc.ToString() : string.Empty;
+            }
+            else if ( aType == TType.ETypeFree )
+            {
+                ret = ( iDeltaFree != 0 ) ? "=" + iDeltaFree.ToString() : string.Empty;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        private string ChangeFactor( int aNetEffect, long aDelta, AddressRange aRange )
+        {
+            StringBuilder ret = new StringBuilder();
+
+            //      ( Total net effect * Total delta )
+            // --------------------------------------------
+            // (Max - Min) * (Number of Matching Data Sets)
+            // 
+            if ( aRange.Max - aRange.Min == 0 )
+            {
+                // Avoid divide by zero when there has been no change
+            }
+            else if ( aDelta == 0 )
+            {
+                // Overall change delta was zero
+            }
+            else
+            {
+                ret.Append( "=" );
+                ret.AppendFormat( "( {0} * ABS({1}) )", aNetEffect, aDelta );
+                ret.Append( " / " );
+                ret.AppendFormat( "( ({0} - {1}) * {2} )", aRange.Max, aRange.Min, iNumberOfMatchingDataSets );
+            }
+
+            //
+            return ret.ToString();
+        }
+        #endregion
+
+        #region Data members
+        public string iThreadName = string.Empty;
+        public long iThreadId = 0;
+        public int iRowIndex = 0;
+        public int iNumberOfMatchingDataSets = 0;
+
+        public AddressRange iRangeChunk = new AddressRange();
+        public AddressRange iRangeAlloc = new AddressRange();
+        public AddressRange iRangeFree = new AddressRange();
+
+        public long iLastChunk = 0;
+        public long iLastAlloc = 0;
+        public long iLastFree = 0;
+
+        public long iDeltaChunk = 0;
+        public long iDeltaAlloc = 0;
+        public long iDeltaFree = 0;
+
+        public int iNetEffectChunk = 0;
+        public int iNetEffectAlloc = 0;
+        public int iNetEffectFree = 0;
+        #endregion
+    }
+    #endregion
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Excel/CSVExcelExporterTwoDataSets.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,275 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Threading;
+using System.Runtime.InteropServices;
+using Excel = Microsoft.Office.Interop.Excel;
+using System.Reflection; 
+using SymbianExcelUtils;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVExcelExporterTwoDataSets : DisposableObject
+    {
+        #region Constructors & destructor
+        public CSVExcelExporterTwoDataSets( string aOutputFileName, string aCol1FileName, string aCol2FileName )
+        {
+            iFileName = aOutputFileName;
+            iCol1FileName = aCol1FileName;
+            iCol2FileName = aCol2FileName;
+            //
+            iExcelApp = new Excel.Application();
+            if ( iExcelApp != null )
+            {
+                iExcelApp.Visible = false;
+                iExcelApp.DisplayAlerts = false;
+
+                // Prepare sheets
+                PrepareWorksheetReadyForData();
+            }
+            else
+            {
+                throw new Exception( "Microsoft Excel not available" );
+            }
+        }
+        #endregion
+
+        #region API
+        public void CompareThread( CSVThread aThread1, CSVThread aThread2 )
+        {
+            // Do comparison
+            iComparerHeapSize.Compare( aThread1, aThread2 );
+            iComparerCellCounts.Compare( aThread1, aThread2 );
+            iComparerLargestCells.Compare( aThread1, aThread2 );
+            iComparerFragmentation.Compare( aThread1, aThread2 );
+            iComparerSlackSpace.Compare( aThread1, aThread2 );
+        }
+        #endregion
+
+        #region From DisposableObject
+        protected override void CleanupManagedResources()
+        {
+            try
+            {
+                if ( iExcelApp != null )
+                {
+                    // We're finished
+                    PrepareWorsheetForSaving();
+
+                    // Save excel workbook
+                    SaveWorkbook();
+
+                    // Close app
+                    Utils.CloseExcel( iExcelApp );
+                }
+
+                iExcelApp = null;
+            }
+            finally
+            {
+                base.CleanupManagedResources();
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void PrepareWorksheetReadyForData()
+        {
+            Excel.Workbooks workbooks = iExcelApp.Workbooks;
+            workbooks.Add(Excel.XlWBATemplate.xlWBATWorksheet);
+            Excel.Workbook workbook = workbooks.get_Item(workbooks.Count);
+            Excel.Sheets sheets = workbook.Worksheets;
+
+            Excel.Worksheet sheet = null;
+            //
+            sheet = (Excel.Worksheet)sheets.Add(Type.Missing, sheets.get_Item(sheets.Count), 1, Excel.XlSheetType.xlWorksheet);
+            iComparerHeapSize = new Comparers.HeapSize( sheet, iCol1FileName, iCol2FileName );
+            iComparerHeapSize.PrepareWorksheetReadyForData();
+            //
+            sheet = (Excel.Worksheet)sheets.Add(Type.Missing, sheets.get_Item(sheets.Count), 1, Excel.XlSheetType.xlWorksheet);
+            iComparerCellCounts = new Comparers.CellCounts( sheet, iCol1FileName, iCol2FileName );
+            iComparerCellCounts.PrepareWorksheetReadyForData();
+            //
+            sheet = (Excel.Worksheet)sheets.Add(Type.Missing, sheets.get_Item(sheets.Count), 1, Excel.XlSheetType.xlWorksheet);
+            iComparerLargestCells = new Comparers.LargestCells( sheet, iCol1FileName, iCol2FileName );
+            iComparerLargestCells.PrepareWorksheetReadyForData();
+            //
+            sheet = (Excel.Worksheet)sheets.Add(Type.Missing, sheets.get_Item(sheets.Count), 1, Excel.XlSheetType.xlWorksheet);
+            iComparerFragmentation = new Comparers.Fragmentation( sheet, iCol1FileName, iCol2FileName );
+            iComparerFragmentation.PrepareWorksheetReadyForData();
+            //
+            sheet = (Excel.Worksheet)sheets.Add(Type.Missing, sheets.get_Item(sheets.Count), 1, Excel.XlSheetType.xlWorksheet);
+            iComparerSlackSpace = new Comparers.SlackSpace( sheet, iCol1FileName, iCol2FileName );
+            iComparerSlackSpace.PrepareWorksheetReadyForData();
+        }
+
+        private void PrepareWorsheetForSaving()
+        {
+            // Finalise comparison sheets
+            iComparerHeapSize.FinaliseWorksheet();
+            iComparerCellCounts.FinaliseWorksheet();
+            iComparerLargestCells.FinaliseWorksheet();
+            iComparerFragmentation.FinaliseWorksheet();
+            iComparerSlackSpace.FinaliseWorksheet();
+
+            // Create summary sheet
+            Excel.Workbooks workbooks = iExcelApp.Workbooks;
+            Excel.Workbook workbook = workbooks.get_Item(workbooks.Count);
+            Excel.Sheets sheets = workbook.Worksheets;
+            Excel.Worksheet sheet = (Excel.Worksheet)sheets.get_Item(1);
+            CreateSummary( sheet );
+            sheet.Activate();
+        }
+
+        private void CreateSummary( Microsoft.Office.Interop.Excel.Worksheet aSheet )
+        {
+            aSheet.Name = "Summary";
+            //
+            int row = 1;
+            Utils.SetValue( row, 2, aSheet, "Delta" );
+            Utils.MakeBoxedTitleRow( row, 2, aSheet, 0xFF0000 );
+            row++;
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "File 1:" );
+            Utils.SetValue( row, 2, aSheet, iCol1FileName );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "File 2:" );
+            Utils.SetValue( row, 2, aSheet, iCol2FileName );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Heap size:" );
+            Utils.SetValue( row, 2, aSheet, iComparerHeapSize.DeltaFormula( 0 ) );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Free space:" );
+            Utils.SetValue( row, 2, aSheet, iComparerHeapSize.DeltaFormula( 1 ) );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Alloc space:" );
+            Utils.SetValue( row, 2, aSheet, iComparerHeapSize.DeltaFormula( 2 ) );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Heap size:" );
+            Utils.SetValue( row, 2, aSheet, iComparerHeapSize.DeltaFormula( 0 ) );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Free cell count:" );
+            Utils.SetValue( row, 2, aSheet, iComparerCellCounts.DeltaFormula( 0 ) );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Allocated cell count:" );
+            Utils.SetValue( row, 2, aSheet, iComparerCellCounts.DeltaFormula( 1 ) );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Fragmentation:" );
+            Utils.SetValue( row, 2, aSheet, iComparerFragmentation.DeltaFormula( 0 ) );
+            //
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Slack space:" );
+            Utils.SetValue( row, 2, aSheet, iComparerSlackSpace.DeltaFormula( 0 ) );
+            Utils.BoldColumn( 1, aSheet );
+
+            // Calculate column sizes
+            Utils.AutoFitColumn( 1, aSheet );
+            Utils.AutoFitColumn( 2, aSheet );
+        }
+
+        private void SaveWorkbook()
+        {
+            string path = Path.GetDirectoryName( iFileName );
+            System.IO.DirectoryInfo dirInfo = new System.IO.DirectoryInfo( path );
+            if ( !dirInfo.Exists )
+            {
+                dirInfo.Create();
+            }
+
+            System.IO.FileInfo fileInfo = new System.IO.FileInfo( iFileName );
+            if ( fileInfo.Exists )
+            {
+                try
+                {
+                    fileInfo.Delete();
+                }
+                catch ( Exception )
+                {
+                }
+            }
+
+            Microsoft.Office.Interop.Excel.Workbooks workbooks = iExcelApp.Workbooks;
+            Microsoft.Office.Interop.Excel.Workbook workbook = workbooks.get_Item( workbooks.Count );
+
+            try
+            {
+                workbook.SaveAs( iFileName,
+                                    Excel.XlFileFormat.xlExcel9795,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Excel.XlSaveAsAccessMode.xlNoChange,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing,
+                                    Type.Missing );
+            }
+            catch ( System.IO.IOException )
+            {
+            }
+
+            workbook.Close( false, Type.Missing, Type.Missing );
+        }
+        #endregion
+
+        #region Data members
+        private readonly string iFileName;
+        private readonly string iCol1FileName;
+        private readonly string iCol2FileName;
+        private Excel.Application iExcelApp;
+        private Comparers.HeapSize iComparerHeapSize;
+        private Comparers.CellCounts iComparerCellCounts;
+        private Comparers.LargestCells iComparerLargestCells;
+        private Comparers.Fragmentation iComparerFragmentation;
+        private Comparers.SlackSpace iComparerSlackSpace;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/CSVThread.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,248 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections.Generic;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVThread
+    {
+        #region Enumerations
+        public enum TFileFormatVersion
+        {
+            EFileFormatVersion1 = 1,
+            EFileFormatVersion2,
+        }
+        #endregion
+
+        #region Static constructor
+        static public CSVThread New()
+        {
+            CSVThread ret = new CSVThread();
+            return ret;
+        }
+
+		static public CSVThread NewDefault( string aThreadName )
+		{
+			CSVThread ret = new CSVThread();
+			ret.iThreadName = aThreadName;
+			ret.iIsDefault = true;
+			return ret;
+		}
+		#endregion
+
+        #region Constructor
+		private CSVThread()
+		{
+		}
+		#endregion
+
+        #region API
+        public void AddThreadWithCommonHeapChunkHandle( CSVThread aOtherThread )
+        {
+            if ( aOtherThread != this )
+            {
+                if ( iThreadsWithCommonHeapChunk == null )
+                {
+                    iThreadsWithCommonHeapChunk = new List<CSVThread>();
+                }
+                iThreadsWithCommonHeapChunk.Add( aOtherThread );
+            }
+        }
+        #endregion
+
+        #region Properties
+        public TFileFormatVersion Version
+        {
+            get
+            {
+                TFileFormatVersion ret = TFileFormatVersion.EFileFormatVersion1;
+                if ( ProcessName != string.Empty && ThreadId != 0 )
+                {
+                    ret = TFileFormatVersion.EFileFormatVersion2;
+                }
+                return ret;
+            }
+        }
+
+        public bool IsDefault { get { return iIsDefault; } set { iIsDefault = value; } }
+        public bool IsSharedHeap
+        { 
+            get 
+            { 
+                return iIsSharedHeap; 
+            }
+            set { iIsSharedHeap = value; } 
+        }
+
+        public string FullName
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                //
+                if ( Version == TFileFormatVersion.EFileFormatVersion2 )
+                {
+                    ret.AppendFormat( "{0}::{1}", ProcessName, ThreadName );
+                }
+                else
+                {
+                    // Old format doesn't support process name
+                    ret.Append( ThreadName );
+                }
+                //
+                return ret.ToString();
+            }
+        }
+
+        public string ThreadName { get { return iThreadName; } set { iThreadName = value; } }
+        public string ProcessName { get { return iProcessName; } set { iProcessName = value; } }
+        public string ChunkName { get { return iChunkName; } set { iChunkName = value; } }
+
+        public long ThreadId { get { return iThreadId; } set { iThreadId = value; } }
+
+        public long ChunkHandle { get { return iChunkHandle; } set { iChunkHandle = value; } }
+        public long ChunkBaseAddress { get { return iChunkBaseAddress; } set { iChunkBaseAddress = value; } }
+
+        public long SizeCurrent { get { return iSizeCurrent; } set { iSizeCurrent = value; } }
+        public long SizeMin { get { return iSizeMin; } set { iSizeMin = value; } }
+        public long SizeMax { get { return iSizeMax; } set { iSizeMax = value; } }
+
+        public long FirstFreeCellAddress { get { return iFirstFreeCellAddress; } set { iFirstFreeCellAddress = value; } }
+        public long FirstFreeCellLength { get { return iFirstFreeCellLength; } set { iFirstFreeCellLength = value; } }
+
+        public long FreeCellCount { get { return iFreeCellCount; } set { iFreeCellCount = value; } }
+        public long FreeCellLargest { get { return iFreeCellLargest; } set { iFreeCellLargest = value; } }
+        public long FreeSpaceTotal { get { return iFreeSpaceTotal; } set { iFreeSpaceTotal = value; } }
+        public long FreeSpaceSlack { get { return iFreeSpaceSlack; } set { iFreeSpaceSlack = value; } }
+
+        public long AllocCellLargest { get { return iAllocCellLargest; } set { iAllocCellLargest = value; } }
+        public long AllocCellCount { get { return iAllocCellCount; } set { iAllocCellCount = value; } }
+        public long AllocSpaceTotal { get { return iAllocSpaceTotal; } set { iAllocSpaceTotal = value; } }
+
+        public long MinCellSize { get { return iMinCellSize; } set { iMinCellSize = value; } }
+        #endregion
+
+		#region From System.Object
+		public override string ToString()
+		{
+			return iThreadName;
+		}
+
+		public override Int32 GetHashCode()
+		{
+			return iThreadName.GetHashCode();
+		}
+		#endregion
+
+		#region Internal methods
+		private static long ParseHexValue( string aItem )
+		{
+			long ret = 0;
+			//
+			if	( aItem.Length > 0 )
+			{
+				const string KHexPrefix = "0x";
+				if	( aItem.IndexOf( KHexPrefix ) == 0 )
+				{
+					aItem = aItem.Substring( KHexPrefix.Length );
+				}
+
+				ret = System.Convert.ToInt32( aItem, 16 );
+			}
+			//
+			return ret;
+		}
+
+		private static long ParseDecimalValue( string aItem )
+		{
+			long ret = 0;
+			//
+			if	( aItem.Length > 0 ) 
+			{
+				ret = System.Convert.ToInt32( aItem );
+			}
+			//
+			return ret;
+		}
+		#endregion
+
+        #region Internal constants
+        private const int KExpectedItemCount = 16;
+        private const string KRDebugLinePrefix = "[Heap Summary] ";
+        #endregion
+
+        #region Data members
+        private bool iIsDefault = false;
+        private bool iIsSharedHeap = false;
+        
+        private string iThreadName = string.Empty;
+        private string iProcessName = string.Empty;
+        private string iChunkName = string.Empty;
+
+        private long iThreadId = 0;
+
+        private long iChunkHandle = 0;
+        private long iChunkBaseAddress = 0;
+
+        private long iSizeCurrent = 0;
+        private long iSizeMin = 0;
+        private long iSizeMax = 0;
+
+        private long iFirstFreeCellAddress = 0;
+        private long iFirstFreeCellLength = 0;
+        //
+        private long iFreeCellCount = 0;
+        private long iFreeCellLargest = 0;
+
+        private long iFreeSpaceTotal = 0;
+        private long iFreeSpaceSlack = 0;
+
+        private long iAllocCellLargest = 0;
+        private long iAllocCellCount = 0;
+        private long iAllocSpaceTotal = 0;
+
+        private long iMinCellSize = 0;
+
+        private List<CSVThread> iThreadsWithCommonHeapChunk;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/CSVThreadPair.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+	internal class CSVThreadPair
+	{
+		#region Constructors & destructor
+        public CSVThreadPair( CSVThread aMaster, CSVThread aSecondary )
+        {
+            iMaster = aMaster;
+            iSecondary = aSecondary;
+        }
+		#endregion
+
+		#region API
+        #endregion
+
+        #region Properties
+        public CSVThread Master
+        {
+            get { return iMaster; }
+        }
+
+        public CSVThread Secondary
+        {
+            get { return iSecondary; }
+        }
+        #endregion
+
+		#region Data members
+        private readonly CSVThread iMaster;
+        private readonly CSVThread iSecondary;
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/CSVThreadParser.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+using HeapComparisonLib.CSV.Thread.Parsers;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVThreadParser
+    {
+        #region Constructors & destructor
+        public CSVThreadParser()
+        {
+            iParserOld = new CSVThreadParserFormatOld( this );
+            iParserNew = new CSVThreadParserFormatNew( this );
+        }
+        #endregion
+
+        #region API
+        public CSVThread ParseLine( string aLine )
+        {
+            CSVThread ret = iParserNew.ParseLine( aLine );
+            //
+            if ( ret == null )
+            {
+                ret = iParserOld.ParseLine( aLine );
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public CSVDataSet CurrentDataSet
+        {
+            get { return iCurrentDataSet; }
+            set { iCurrentDataSet = value; }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Data members
+        private CSVDataSet iCurrentDataSet = null;
+        private readonly CSVThreadParserFormatOld iParserOld;
+        private readonly CSVThreadParserFormatNew iParserNew;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/Parsers/CSVThreadParserFormatNew.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,355 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV.Thread.Parsers
+{
+    internal class CSVThreadParserFormatNew
+    {
+        #region Constructors & destructor
+        public CSVThreadParserFormatNew( CSVThreadParser aParser )
+        {
+            iParser = aParser;
+        }
+        #endregion
+
+        #region API
+        public CSVThread ParseLine( string aLine )
+        {
+            if ( !TryToParseEntry( aLine ) )
+            {
+                if ( !TryToParseTimestamp( aLine ) )
+                {
+                    TryToParseSupportedTags( aLine );
+                }
+            }
+
+            // Return a constructed entry (or null) if we have one ready
+            CSVThread ret = iConstructedEntry;
+            iConstructedEntry = null;
+            return ret;
+        }
+        #endregion
+
+        #region Internal enumerations
+        private enum TState
+        {
+            EStateIdle = 0,
+            EStateSeenEntryStart,
+            EStateSeenThreadName,
+            EStateSeenProcessName,
+            EStateSeenChunkName,
+            EStateSeenFieldBody,
+            EStateSeenEntryEnd,
+        }
+        #endregion
+
+        #region Internal methods
+        private bool TryToParseEntry( string aLine )
+        {
+            Match matchEntry = KRegExEntry.Match( aLine );
+            if ( matchEntry.Success )
+            {
+                // Check if it's an opening or closing tag.
+                bool isOpen = string.IsNullOrEmpty( matchEntry.Groups[ "TagType" ].Value );
+                int index = int.Parse( matchEntry.Groups[ "Index" ].Value );
+                if ( isOpen )
+                {
+                    // Opening tag - starting a new entry, save entry id
+                    ChangeState( TState.EStateSeenEntryStart );
+                    SaveCurrentEntryIfValidState();
+
+                    iCurrentEntryId = index;
+                    iWorkInProgressThread = CSVThread.New();
+                }
+                else
+                {
+                    // Closing tag, we should've finished an entry now. 
+                    // Validate the index is as we expect
+                    CheckExpectedIndexId( index );
+                    ChangeState( TState.EStateSeenEntryEnd );
+                    SaveCurrentEntryIfValidState();
+                }
+            }
+            
+            return matchEntry.Success;
+        }
+
+        private bool TryToParseTimestamp( string aLine )
+        {
+            Match match = KRegExTimestamp.Match( aLine );
+            if ( match.Success )
+            {
+                // Get time value
+                long timestamp = long.Parse( match.Groups[ "Timestamp" ].Value );
+                if ( iParser.CurrentDataSet != null )
+                {
+                    iParser.CurrentDataSet.TimeStamp = timestamp;
+                }
+            }
+
+            return match.Success;
+        }
+
+        private bool TryToParseSupportedTags( string aLine )
+        {
+            Match matchStandardFields = KRegExTagTypes.Match( aLine );
+            if ( matchStandardFields.Success )
+            {
+                if ( iWorkInProgressThread == null )
+                {
+                    throw new Exception( "Corruption detected - work in progress thread is null" );
+                }
+
+                // Check the index is what we expect it to be
+                int index = int.Parse( matchStandardFields.Groups[ "Index" ].Value );
+                CheckExpectedIndexId( index );
+
+                // Now digest the tag body
+                string body = matchStandardFields.Groups[ "Body" ].Value;
+                string tagName = matchStandardFields.Groups[ "TagName" ].Value;
+                if ( tagName == "THREAD_NAME" )
+                {
+                    iWorkInProgressThread.ThreadName = body;
+                    ChangeState( TState.EStateSeenThreadName );
+                }
+                else if ( tagName == "PROCESS_NAME" )
+                {
+                    iWorkInProgressThread.ProcessName = body;
+                    ChangeState( TState.EStateSeenProcessName );
+                }
+                else if ( tagName == "CHUNK_NAME" )
+                {
+                    iWorkInProgressThread.ChunkName = body;
+                    ChangeState( TState.EStateSeenChunkName );
+                }
+                else if ( tagName == "FIELDS" )
+                {
+                    string[] elements = body.Trim().Split( ',' );
+                    ExtractFields( elements );
+                    ChangeState( TState.EStateSeenFieldBody );
+                }
+            }
+
+            return matchStandardFields.Success;
+        }
+
+        private void ChangeState( TState aState )
+        {
+            iState = aState;
+        }
+
+        private void CheckExpectedIndexId( int aValue )
+        {
+            if ( aValue != iCurrentEntryId )
+            {
+                throw new Exception( "Corruption detected - index id incorrect" );
+            }
+        }
+
+        private void SaveCurrentEntryIfValidState()
+        {
+            if ( iWorkInProgressThread != null )
+            {
+                // Perhaps we didn't encounter the closing tag for some odd reason?
+                if ( iState == TState.EStateSeenFieldBody || iState == TState.EStateSeenEntryEnd )
+                {
+                    iConstructedEntry = iWorkInProgressThread;
+                    iWorkInProgressThread = null;
+                }
+            }
+        }
+
+        private void ExtractFields( string[] aValues )
+        {
+            if ( aValues.Length != KExpectedFieldCount )
+            {
+                throw new Exception( "Corruption detected - field count incorrect" );
+            }
+
+            // TID
+            iWorkInProgressThread.ThreadId = ParseDecimalValue( aValues[ 0 ] );
+
+            // CHUNK
+            iWorkInProgressThread.ChunkHandle = ParseHexValue( aValues[ 1 ] );
+            iWorkInProgressThread.ChunkBaseAddress = ParseHexValue( aValues[ 2 ] );
+
+            // HEAP
+            iWorkInProgressThread.SizeCurrent = ParseDecimalValue( aValues[ 3 ] );
+            iWorkInProgressThread.SizeMin = ParseDecimalValue( aValues[ 4 ] );
+            iWorkInProgressThread.SizeMax = ParseDecimalValue( aValues[ 5 ] );
+
+            // FIRST FREE CELL
+            iWorkInProgressThread.FirstFreeCellAddress = ParseHexValue( aValues[ 6 ] );
+            iWorkInProgressThread.FirstFreeCellLength = ParseDecimalValue( aValues[ 7 ] );
+
+            // OTHER FREE CELL INFO
+            iWorkInProgressThread.FreeCellCount = ParseDecimalValue( aValues[ 8 ] );
+            iWorkInProgressThread.FreeSpaceTotal = ParseDecimalValue( aValues[ 9 ] );
+            iWorkInProgressThread.FreeSpaceSlack = ParseDecimalValue( aValues[ 10 ] );
+            iWorkInProgressThread.FreeCellLargest = ParseDecimalValue( aValues[ 11 ] );
+
+            // ALLOC CELL INFO
+            iWorkInProgressThread.AllocCellLargest = ParseDecimalValue( aValues[ 12 ] );
+            iWorkInProgressThread.AllocCellCount = ParseDecimalValue( aValues[ 13 ] );
+            iWorkInProgressThread.AllocSpaceTotal = ParseDecimalValue( aValues[ 15 ] ); // NB: this is item 15, not 14!
+
+            // MISC
+            iWorkInProgressThread.MinCellSize = ParseDecimalValue( aValues[ 14 ] );
+            iWorkInProgressThread.IsSharedHeap = ( ParseDecimalValue( aValues[ 16 ] ) != 0 );
+        }
+
+        private static long ParseHexValue( string aItem )
+        {
+            long ret = 0;
+            //
+            if ( aItem.Length > 0 )
+            {
+                const string KHexPrefix = "0x";
+                if ( aItem.IndexOf( KHexPrefix ) == 0 )
+                {
+                    aItem = aItem.Substring( KHexPrefix.Length );
+                }
+
+                ret = System.Convert.ToInt32( aItem, 16 );
+            }
+            //
+            return ret;
+        }
+
+        private static long ParseDecimalValue( string aItem )
+        {
+            long ret = 0;
+            //
+            if ( aItem.Length > 0 )
+            {
+                ret = System.Convert.ToInt32( aItem );
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KExpectedFieldCount = 17;
+        #endregion
+
+        #region Internal regular expression
+        private static Regex KRegExEntry = new Regex(
+              "\\<(?<TagType>/|)ENTRY_(?<Index>[0-9]{4})\\>",
+              RegexOptions.Singleline
+            | RegexOptions.CultureInvariant
+            | RegexOptions.IgnorePatternWhitespace
+            | RegexOptions.Compiled
+            );
+ 
+        private static Regex KRegExTimestamp = new Regex(
+              "\\<TIMESTAMP\\>(?<Timestamp>[0-9].+?)\\</TIMESTAMP\\>",
+              RegexOptions.Singleline
+            | RegexOptions.CultureInvariant
+            | RegexOptions.IgnorePatternWhitespace
+            | RegexOptions.Compiled
+            );
+
+        // <summary>
+        //  Regular expression built for C# on: Wed, Sep 10, 2008, 09:39:13 AM
+        //  Using Expresso Version: 3.0.2766, http://www.ultrapico.com
+        //  
+        //  A description of the regular expression:
+        //  
+        //  Literal <
+        //  [TagName]: A named capture group. [THREAD_NAME|PROCESS_NAME|CHUNK_NAME|FIELDS]
+        //      Select from 4 alternatives
+        //          THREAD_NAME
+        //              THREAD_NAME
+        //          PROCESS_NAME
+        //              PROCESS_NAME
+        //          CHUNK_NAME
+        //              CHUNK_NAME
+        //          FIELDS
+        //              FIELDS
+        //  _
+        //  [Index]: A named capture group. [[0-9]{4}]
+        //      Any character in this class: [0-9], exactly 4 repetitions
+        //  Literal >
+        //  [Body]: A named capture group. [.+?]
+        //      Any character, one or more repetitions, as few as possible
+        //  \</
+        //      Literal <
+        //      /
+        //  Match expression but don't capture it. [THREAD_NAME|PROCESS_NAME|CHUNK_NAME|FIELDS]
+        //      Select from 4 alternatives
+        //          THREAD_NAME
+        //              THREAD_NAME
+        //          PROCESS_NAME
+        //              PROCESS_NAME
+        //          CHUNK_NAME
+        //              CHUNK_NAME
+        //          FIELDS
+        //              FIELDS
+        //  _
+        //  Match expression but don't capture it. [[0-9]{4}]
+        //      Any character in this class: [0-9], exactly 4 repetitions
+        //  Literal >
+        //  
+        //
+        // </summary>
+        private static Regex KRegExTagTypes = new Regex(
+              "\\<(?<TagName>THREAD_NAME|PROCESS_NAME|CHUNK_NAME|FIELDS)_(?" +
+              "<Index>[0-9]{4})\\>(?<Body>.+?)\\</(?:THREAD_NAME|PROCESS_NA" +
+              "ME|CHUNK_NAME|FIELDS)_(?:[0-9]{4})\\>",
+            RegexOptions.Singleline
+            | RegexOptions.CultureInvariant
+            | RegexOptions.IgnorePatternWhitespace
+            | RegexOptions.Compiled
+            );
+        #endregion
+
+        #region Data members
+        private readonly CSVThreadParser iParser;
+        private TState iState = TState.EStateIdle;
+        private int iCurrentEntryId = -1;
+        private CSVThread iWorkInProgressThread = null;
+        private CSVThread iConstructedEntry = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Thread/Parsers/CSVThreadParserFormatOld.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV.Thread.Parsers
+{
+    internal class CSVThreadParserFormatOld
+    {
+        #region Constructors & destructor
+        public CSVThreadParserFormatOld( CSVThreadParser aParser )
+        {
+        }
+        #endregion
+
+        #region API
+        public CSVThread ParseLine( string aLine )
+        {
+            CSVThread ret = null;
+            //
+            Match m = KParserRegEx.Match( aLine );
+            if ( m.Success )
+            {
+                ret = CSVThread.New();
+                //
+                string[] items = m.Value.Split( ',' );
+                if ( items.Length >= KExpectedItemCount )
+                {
+                    // Ensure each item is trimmed before processing
+                    for ( int i = 0; i < items.Length; i++ )
+                    {
+                        items[ i ] = items[ i ].Trim();
+                    }
+
+                    try
+                    {
+                        // THREAD
+                        ret.ThreadName = items[ 0 ];
+
+                        // CHUNK
+                        ret.ChunkName = items[ 1 ];
+                        ret.ChunkBaseAddress = ParseHexValue( items[ 2 ] );
+
+                        // HEAP
+                        ret.SizeCurrent = ParseDecimalValue( items[ 3 ] );
+                        ret.SizeMin = ParseDecimalValue( items[ 4 ] );
+                        ret.SizeMax = ParseDecimalValue( items[ 5 ] );
+
+                        // FIRST FREE CELL
+                        ret.FirstFreeCellAddress = ParseHexValue( items[ 6 ] );
+                        ret.FirstFreeCellLength = ParseDecimalValue( items[ 7 ] );
+
+                        // OTHER FREE CELL INFO
+                        ret.FreeCellCount = ParseDecimalValue( items[ 8 ] );
+                        ret.FreeSpaceTotal = ParseDecimalValue( items[ 9 ] );
+                        ret.FreeSpaceSlack = ParseDecimalValue( items[ 10 ] );
+                        ret.FreeCellLargest = ParseDecimalValue( items[ 11 ] );
+
+                        // ALLOC CELL INFO
+                        ret.AllocCellLargest = ParseDecimalValue( items[ 12 ] );
+                        ret.AllocCellCount = ParseDecimalValue( items[ 13 ] );
+                        ret.AllocSpaceTotal = ParseDecimalValue( items[ 15 ] );
+
+                        // MISC
+                        ret.MinCellSize = ParseDecimalValue( items[ 14 ] );
+                    }
+                    catch ( Exception )
+                    {
+                        ret = null;
+                    }
+                }
+            }
+
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KExpectedItemCount = 16;
+        #endregion
+
+        #region Internal methods
+        private static long ParseHexValue( string aItem )
+        {
+            long ret = 0;
+            //
+            if ( aItem.Length > 0 )
+            {
+                const string KHexPrefix = "0x";
+                if ( aItem.IndexOf( KHexPrefix ) == 0 )
+                {
+                    aItem = aItem.Substring( KHexPrefix.Length );
+                }
+
+                ret = System.Convert.ToInt32( aItem, 16 );
+            }
+            //
+            return ret;
+        }
+
+        private static long ParseDecimalValue( string aItem )
+        {
+            long ret = 0;
+            //
+            if ( aItem.Length > 0 )
+            {
+                ret = System.Convert.ToInt32( aItem );
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal regular expression
+        // <summary>
+        //  Regular expression built for C# on: Tue, Sep 9, 2008, 02:09:20 PM
+        //  Using Expresso Version: 3.0.2766, http://www.ultrapico.com
+        //  
+        //  A description of the regular expression:
+        //  
+        //  [Thread]: A named capture group. [(?:[A-Za-z0-9!_$ ]+)\:\:(?:[A-Za-z0-9!_$: ]+)]
+        //      (?:[A-Za-z0-9!_$ ]+)\:\:(?:[A-Za-z0-9!_$: ]+)
+        //          Match expression but don't capture it. [[A-Za-z0-9!_$ ]+]
+        //              Any character in this class: [A-Za-z0-9!_$ ], one or more repetitions
+        //          Literal :
+        //          Literal :
+        //          Match expression but don't capture it. [[A-Za-z0-9!_$: ]+]
+        //              Any character in this class: [A-Za-z0-9!_$: ], one or more repetitions
+        //  Literal ,
+        //  [Chunk]: A named capture group. [[A-Za-z0-9!_$ \[\]:.]+]
+        //      Any character in this class: [A-Za-z0-9!_$ \[\]:.], one or more repetitions
+        //  Match expression but don't capture it. [   \,   (?<Items>        [A-Za-z0-9!_$ \[\]:.]   +)], exactly 14 repetitions
+        //         \,   (?<Items>        [A-Za-z0-9!_$ \[\]:.]   +)
+        //          Literal ,
+        //          [Items]: A named capture group. [        [A-Za-z0-9!_$ \[\]:.]   +]
+        //              Any character in this class: [A-Za-z0-9!_$ \[\]:.], one or more repetitions
+        //  
+        //
+        // </summary>
+        private static readonly Regex KParserRegEx = new Regex(
+              "(?<Thread>(?:[A-Za-z0-9!_$ ]+)\\:\\:(?:[A-Za-z0-9!_$: ]+))\r\n"+
+              "\\,\r\n(?<Chunk>[A-Za-z0-9!_$ \\[\\]:.]+)\r\n(?:\r\n   \\,\r\n   (?<"+
+              "Items>\r\n        [A-Za-z0-9!_$ \\[\\]:.]\r\n   +)\r\n){14}",
+            RegexOptions.Singleline
+            | RegexOptions.CultureInvariant
+            | RegexOptions.IgnorePatternWhitespace
+            | RegexOptions.Compiled
+            );
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Workers/CSVWorkerAllDataSetComparator.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,204 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Threading;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVWorkerAllDataSetComparator : DisposableObject
+	{
+		#region Observer related
+		public enum TEvent
+		{
+			EExportingStarted = 0,
+			EExportingProgress,
+			EExportingComplete
+		}
+
+        public delegate void Observer( TEvent aEvent );
+		public event Observer eObserver;
+		#endregion
+
+		#region Constructors & destructor
+        public CSVWorkerAllDataSetComparator( CSVDataSetCollection aDataSets, string aOutputFileName )
+		{
+            // Create our list of sorted comparison pairs.
+            iDataSets = aDataSets;
+            iUniqueThreadDetails = IdentifyAllThreadNames();
+            iExcelExporter = new CSVExcelExporterAllDataSets( aOutputFileName, iUniqueThreadDetails, aDataSets.Count );
+        }
+		#endregion
+
+		#region API
+		public void CompareAndSaveAsync()
+		{
+            iWorkerThread = new System.Threading.Thread( new ThreadStart( ThreadFunction ) );
+            iWorkerThread.Start();
+		}
+		#endregion
+
+		#region Properties
+		public int Progress
+		{
+			get
+            {
+                int count = 0;
+                int index = 0;
+                //
+                lock ( this )
+                {
+                    index = iIndex;
+                    count = iDataSets.Count;
+                }
+
+                float ret = (float) index / (float) count;
+                ret *= 100.0f;
+                return (int) ret;
+            }
+		}
+		#endregion
+
+        #region From DisposableObject
+        protected override void CleanupManagedResources()
+        {
+            try
+            {
+                if ( iExcelExporter != null )
+                {
+                    iExcelExporter.Dispose();
+                    iExcelExporter = null;
+                }
+            }
+            finally
+            {
+                base.CleanupManagedResources();
+            }
+        }
+        #endregion
+
+        #region Thread function
+        private void ThreadFunction()
+        {
+            // Report started
+            if ( eObserver != null )
+            {
+                eObserver( TEvent.EExportingStarted );
+            }
+
+            // Now compare them and export to excel
+            CompareAndExport();
+
+            // Dispose excel object - closes file
+            iExcelExporter.Dispose();
+            iExcelExporter = null;
+
+            // Report finished
+            if ( eObserver != null )
+            {
+                eObserver( TEvent.EExportingComplete );
+            }
+        }
+		#endregion
+
+		#region Internal methods
+        private SortedDictionary<long, string> IdentifyAllThreadNames()
+        {
+            // Get a list of unique thread ids and their full names
+            SortedDictionary<long, string> list = new SortedDictionary<long, string>();
+            int count = iDataSets.Count;
+            for ( int i = 0; i<count; i++ )
+            {
+                CSVDataSet set = iDataSets[ i ];
+                AddThreadsToList( set, list );
+            }
+
+            return list;
+        }
+
+        private void AddThreadsToList( CSVDataSet aSet, SortedDictionary<long, string> aList )
+        {
+            int count = aSet.Count;
+            for ( int i = count - 1; i >= 0; i-- )
+            {
+                CSVThread master = aSet[ i ];
+                if ( aList.ContainsKey( master.ThreadId ) == false )
+                {
+                    aList.Add( master.ThreadId, master.FullName );
+                }
+            }
+        }
+
+        private void CompareAndExport()
+        {
+            lock ( this )
+            {
+                iIndex = 0;
+            }
+
+            for( ; iIndex<iDataSets.Count; )
+            {
+                CSVDataSet set = iDataSets[ iIndex ];
+
+                iExcelExporter.Export( set );
+
+                // Report progress to any observers
+                if ( eObserver != null )
+                {
+                    eObserver( TEvent.EExportingProgress );
+                }
+
+                lock ( this )
+                {
+                    ++iIndex;
+                }
+            }
+        }
+		#endregion
+
+		#region Data members
+        private readonly CSVDataSetCollection iDataSets;
+        private readonly SortedDictionary<long, string> iUniqueThreadDetails;
+        private CSVExcelExporterAllDataSets iExcelExporter = null;
+        private System.Threading.Thread iWorkerThread;
+        private int iIndex = 0;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Workers/CSVWorkerLogSplitter.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,165 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.IO;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVWorkerLogSplitter : AsyncTextFileReader
+    {
+        #region Constructors
+        public CSVWorkerLogSplitter( string aFileName, CSVDataSetCollection aStorage )
+            : base( aFileName )
+		{
+            iStorage = aStorage;
+        }
+        #endregion
+
+        #region API
+        public void SplitAsync()
+        {
+            base.AsyncRead();
+        }
+        #endregion
+
+        #region Properties
+		#endregion
+
+        #region From AsyncTextFileReader
+        protected override void HandleFilteredLine( string aLine )
+        {
+            string originalLine = aLine;
+            iCleaner.CleanLine( ref aLine );
+
+            // Strip prefix
+            if ( CheckForKnownElement( ref aLine, KRDebugPrefixes ) )
+            {
+            }
+
+            // Main handler
+            if ( CheckForKnownElement( ref aLine, KMarkerEnd ) )
+            {
+                // Finished an item - forced flush
+                if ( iCurrentDataSet != null )
+                {
+                    iStorage.Add( iCurrentDataSet );
+                }
+
+                iCurrentDataSet = new CSVDataSet( base.FileName, base.LineNumber );
+                iParser.CurrentDataSet = iCurrentDataSet;
+            }
+            else if ( CheckForKnownElement( ref aLine, KMarkerStart ) )
+            {
+                // Start of item - make a new entry
+                iCurrentDataSet = new CSVDataSet( base.FileName, base.LineNumber );
+                iParser.CurrentDataSet = iCurrentDataSet;
+            }
+            else
+            {
+                // Is it a valid line?
+                CSVThread threadEntry = iParser.ParseLine( aLine );
+                if ( threadEntry != null )
+                {
+                    if ( iCurrentDataSet != null )
+                    {
+                        iCurrentDataSet.Add( threadEntry );
+                    }
+                }
+            }
+        }
+
+        protected override void HandleReadCompleted()
+        {
+            try
+            {
+                base.HandleReadCompleted();
+            }
+            finally
+            {
+                // Save any WIP entry
+                if ( iCurrentDataSet != null && iCurrentDataSet.Count > 0 && !iStorage.Contains( iCurrentDataSet ) )
+                {
+                    iStorage.Add( iCurrentDataSet );
+                    iCurrentDataSet = null;
+                }
+                
+                // Remove any collections with no entries
+                iStorage.RemoveEmptyDataSets();
+
+                // Order by timestamp
+                iStorage.SortByTimestamp();
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private bool CheckForKnownElement( ref string aLine, string[] aPrefixes )
+        {
+            bool handled = false;
+            //
+            foreach ( string prefix in aPrefixes )
+            {
+                if ( aLine.Contains( prefix ) )
+                {
+                    PrefixParser.SkipPrefix( prefix, ref aLine );
+                    handled = true;
+                    break;
+                }
+            }
+            //
+            return handled;
+        }
+        #endregion
+
+        #region Interanl constants
+        private static readonly string[] KRDebugPrefixes = new string[] { "[Heap Summary] ", "CSV - " };
+        private static readonly string[] KMarkerEnd = new string[] { "</MEMSPY_HEAP_CSV>", "</CSV_HEAP_SUMMARY>", "<= End Heap Summary =>", "<= HEAP SUMMARY END =>" };
+        private static readonly string[] KMarkerStart = new string[] { "<MEMSPY_HEAP_CSV>", "<CSV_HEAP_SUMMARY>", "<= HEAP SUMMARY START =>", "Thread, Chunk, Base Addr, Size, Min, Max, 1st Free Addr, 1st Free Len, Free Count, Total Free Space" };
+        #endregion
+
+        #region Data members
+        private readonly CSVDataSetCollection iStorage;
+        private CSVDataSet iCurrentDataSet = null;
+        private TracePrefixAnalyser iCleaner = new TracePrefixAnalyser();
+        private CSVThreadParser iParser = new CSVThreadParser();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/CSV/Workers/CSVWorkerTwoDataSetComparator.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,246 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Threading;
+using SymbianUtils;
+
+namespace HeapComparisonLib.CSV
+{
+    internal class CSVWorkerTwoDataSetComparator : DisposableObject
+	{
+		#region Observer related
+		public enum TEvent
+		{
+			EExportingStarted = 0,
+			EExportingProgress,
+			EExportingComplete
+		}
+
+        public delegate void Observer( TEvent aEvent, string aFullName );
+		public event Observer eObserver;
+		#endregion
+
+		#region Constructors & destructor
+        public CSVWorkerTwoDataSetComparator( CSVDataSet aCol1, CSVDataSet aCol2, string aOutputFileName )
+		{
+            // Make copies because we actually dequeue items from the list as we processed them
+            // and we must not alter the originals or else we'll break the subsequent comparison(s)
+			iCol1 = new CSVDataSet( aCol1 );
+			iCol2 = new CSVDataSet( aCol2 );
+            iExcelExporter = new CSVExcelExporterTwoDataSets( aOutputFileName, aCol1.FileName, aCol2.FileName );
+		}
+		#endregion
+
+		#region API
+		public void CompareAndSaveAsync()
+		{
+            iWorkerThread = new System.Threading.Thread( new ThreadStart( ThreadFunction ) );
+            iWorkerThread.Start();
+		}
+		#endregion
+
+		#region Properties
+		public int Progress
+		{
+			get
+            {
+                int count = 0;
+                int index = 0;
+                //
+                lock ( this )
+                {
+                    index = iIndex;
+                    count = iPairings.Count;
+                }
+
+                float ret = (float) index / (float) count;
+                ret *= 100.0f;
+                return (int) ret;
+            }
+		}
+		#endregion
+
+        #region From DisposableObject
+        protected override void CleanupManagedResources()
+        {
+            try
+            {
+                if ( iExcelExporter != null )
+                {
+                    iExcelExporter.Dispose();
+                    iExcelExporter = null;
+                }
+            }
+            finally
+            {
+                base.CleanupManagedResources();
+            }
+        }
+        #endregion
+
+        #region Thread function
+        private void ThreadFunction()
+        {
+            // Report started
+            if ( eObserver != null )
+            {
+                eObserver( TEvent.EExportingStarted, null );
+            }
+
+            // Create our list of sorted comparison pairs.
+            BuildPairs();
+
+            // Now compare them and export to excel
+            CompareAndExport();
+
+            // Dispose excel object - closes file
+            iExcelExporter.Dispose();
+            iExcelExporter = null;
+
+            // Report finished
+            if ( eObserver != null )
+            {
+                eObserver( TEvent.EExportingComplete, null );
+            }
+        }
+		#endregion
+
+		#region Internal methods
+        private void BuildPairs()
+        {
+            // Treat the first collection as the master list. 
+            int count = iCol1.Count;
+            for ( int i = count - 1; i >= 0; i-- )
+            {
+                CSVThread master = iCol1[ i ];
+
+                // Remove primary entry also
+                iCol1.Remove( master );
+
+                // Create or locate secondary
+                CSVThread secondary = FindAppropriateSecondary( master, iCol2 );
+
+                // Create a pairing
+                iPairings.Add( master.FullName, new CSVThreadPair( master, secondary ) );
+            }
+
+            // Now do the same but for the secondary list this time. It should
+            // be largely empty. The only entries that will remain are threads
+            // which don't exist in the primary list.
+            count = iCol2.Count;
+            for ( int i = count - 1; i >= 0; i-- )
+            {
+                CSVThread master = iCol2[ i ];
+
+                // Remove primary entry also
+                iCol2.Remove( master );
+
+                // Create or locate secondary
+                CSVThread secondary = FindAppropriateSecondary( master, iCol1 );
+
+                // Create a pairing - but this time the master is the 2nd entry 
+                // in the pair. This ensures we keep the threads in the correct
+                // columns in the final excel spreadsheet.
+                iPairings.Add( master.FullName, new CSVThreadPair( secondary, master ) );
+            }
+        }
+
+        private CSVThread FindAppropriateSecondary( CSVThread aMaster, CSVDataSet aSecondaryCol )
+        {
+            System.Diagnostics.Debug.Assert( aMaster.FullName != string.Empty );
+
+            // We must try to find the corresponding secondary thread with which to compare
+            // aMaster.
+            CSVThread secondary = aSecondaryCol[ aMaster.FullName ];
+            if ( secondary == null )
+            {
+                // Secondary collection doesn't contain this thread, so make a default entry.
+                secondary = CSVThread.NewDefault( aMaster.FullName );
+            }
+            else
+            {
+                aSecondaryCol.Remove( secondary );
+            }
+
+            return secondary;
+        }
+
+        private void CompareAndExport()
+        {
+            lock ( this )
+            {
+                iIndex = 0;
+            }
+
+            foreach ( KeyValuePair<string, CSVThreadPair> kvp in iPairings )
+            {
+                CSVThreadPair pair = kvp.Value;
+
+                // Report progress to any observers
+                if ( eObserver != null )
+                {
+                    eObserver( TEvent.EExportingProgress, kvp.Key );
+                }
+
+                lock ( this )
+                {
+                    ++iIndex;
+                }
+
+                CompareAndExport( pair.Master, pair.Secondary );
+            }
+        }
+
+        private void CompareAndExport( CSVThread aMaster, CSVThread aSecondary )
+        {
+            iExcelExporter.CompareThread( aMaster, aSecondary );
+        }
+		#endregion
+
+		#region Data members
+        private readonly CSVDataSet iCol1;
+        private readonly CSVDataSet iCol2;
+        private CSVExcelExporterTwoDataSets iExcelExporter = null;
+        private SortedList<string, CSVThreadPair> iPairings = new SortedList< string, CSVThreadPair>();
+        private System.Threading.Thread iWorkerThread;
+        private int iIndex = 0;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/ComparsionEngine.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,419 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+using SymbianUtils.Range;
+using SymbianUtils.RawItems;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using SymbianUtils.TextUtilities.Readers.Types.Array;
+
+namespace HeapComparisonLib.Data
+{
+    public class ComparsionEngine : AsyncArrayReader<HeapCell>
+    {
+        #region Constructors & destructor
+        public ComparsionEngine( HeapReconstructor aReconstructor1, HeapReconstructor aReconstructor2 )
+            : base( new ComparsionCellSupplierProxy( aReconstructor1 ) )
+        {
+            iReconstructor1 = aReconstructor1;
+            iReconstructor2 = aReconstructor2;
+        }
+        #endregion
+
+        #region API
+        public void Compare()
+        {
+            AsyncRead();
+        }
+        #endregion
+
+        #region Properties
+        public HeapReconstructor Reconstructor1
+        {
+            get { return iReconstructor1; }
+        }
+
+        public HeapReconstructor Reconstructor2
+        {
+            get { return iReconstructor2; }
+        }
+
+        public HeapCellArrayWithStatistics ResultsUnchanged
+        {
+            get { return iUnchanged; }
+        }
+
+        public HeapCellArrayWithStatistics ResultsUnchangedLengthButDifferentContents
+        {
+            get { return iUnchangedLengthButDifferentContents; }
+        }
+
+        public HeapCellArrayWithStatistics ResultsChanged
+        {
+            get { return iChanged; }
+        }
+
+        public HeapCellArrayWithStatistics ResultsUniqueInHeap1
+        {
+            get { return iUniqueInReconstructor1; }
+        }
+
+        public HeapCellArrayWithStatistics ResultsUniqueInHeap2
+        {
+            get { return iUniqueInReconstructor2; }
+        }
+        #endregion
+
+        #region From AsyncArrayReader
+        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 );
+            }
+        }
+
+        protected override void HandleReadCompleted()
+        {
+            try
+            {
+                base.HandleReadCompleted();
+            }
+            finally
+            {
+                // Anything left behind in reconstructor 2 was unique to it.
+                int count = iReconstructor2.Data.Count;
+                int alreadyHave = iUniqueInReconstructor2.Count;
+                foreach ( HeapCell leftover in iReconstructor2.Data )
+                {
+                    iUniqueInReconstructor2.Add( leftover );
+                }
+                System.Diagnostics.Debug.Assert( alreadyHave + count == iUniqueInReconstructor2.Count );
+            }
+
+            /*
+            int unchanged = CountBySymbol( "CFsDisconnectRequest", iUnchanged );
+            int diffContents = CountBySymbol( "CFsDisconnectRequest", iUnchangedLengthButDifferentContents );
+            int changed = CountBySymbol( "CFsDisconnectRequest", iChanged );
+            int unique1 = 0;// CountBySymbol( "CFsDisconnectRequest", iUniqueInReconstructor1 );
+            int unique2 = CountBySymbol( "CFsDisconnectRequest", iUniqueInReconstructor2 );
+
+            int total = unchanged + diffContents + changed + unique1 + unique2;
+
+            int x = total;
+            */
+        }
+        #endregion
+
+        #region Internal methods
+        private void CompareCellsWithSameLengths( HeapCell aFromRecon1, HeapCell aFromRecon2 )
+        {
+            System.Diagnostics.Debug.Assert( aFromRecon1.Tag == null );
+            System.Diagnostics.Debug.Assert( aFromRecon1.Address == aFromRecon2.Address );
+            System.Diagnostics.Debug.Assert( aFromRecon2.Type == aFromRecon2.Type );
+            System.Diagnostics.Debug.Assert( aFromRecon1.Length == aFromRecon2.Length );
+
+            // Cells are the same, at least at face value. We also compare
+            // contents to spot those that are entirely [unchanged].
+            bool equal = ( aFromRecon1.IsIdentical( aFromRecon2 ) );
+            if ( equal )
+            {
+                // Absolutely identical to one another
+                aFromRecon1.Tag = aFromRecon2;
+                iUnchanged.Add( aFromRecon1 );
+            }
+            else
+            {
+                // Same length, same type, but otherwise the contents are different
+                //
+                // If it's an allocated cell and the vTables are different, then 
+                // the cell is treated as [unique].
+                //
+                // If it's a free cell, we don't care.
+                if ( aFromRecon2.Type == HeapCell.TType.EAllocated )
+                {
+                    uint vt1 = aFromRecon1.IsUnknown ? 0 : aFromRecon1.PossibleVTableAddress;
+                    uint vt2 = aFromRecon2.IsUnknown ? 0 : aFromRecon2.PossibleVTableAddress;
+
+                    // If there was no associated symbol then the comparison will be zero vs
+                    // zero, in which case we'll still treat it as the [same length, diff content],
+                    // rather than unique. This might happen for blob cells, e.g. those that
+                    // are the payload for RArray or CBufFlat etc.
+                    if ( vt1 == vt2 )
+                    {
+                        // VTables are the same, but somehow the remaining content is different.
+                        // Must also check whether one is a descriptor an the other isn't!
+                        if ( aFromRecon1.IsDescriptor != aFromRecon2.IsDescriptor )
+                        {
+                            // One is a descriptor, the other isn't => [unique]
+                            iUniqueInReconstructor1.Add( aFromRecon1 );
+                            iUniqueInReconstructor2.Add( aFromRecon2 );
+                        }
+                        else
+                        {
+                            // [same length, diff content]
+                            aFromRecon1.Tag = aFromRecon2;
+                            iUnchangedLengthButDifferentContents.Add( aFromRecon1 );
+                        }
+                    }
+                    else
+                    {
+                        // VTables are different, lengths and types are the same => [unique]
+                        iUniqueInReconstructor1.Add( aFromRecon1 );
+                        iUniqueInReconstructor2.Add( aFromRecon2 );
+                    }
+                }
+                else
+                {
+                    // Must be a free cell, and since the length is the same we
+                    // really don't care => [same length, diff content]
+                    aFromRecon1.Tag = aFromRecon2;
+                    iUnchangedLengthButDifferentContents.Add( aFromRecon1 );
+                }
+            }
+        }
+
+        private void CompareCellsWithDifferentLengths( HeapCell aFromRecon1, HeapCell aFromRecon2 )
+        {
+            System.Diagnostics.Debug.Assert( aFromRecon1.Tag == null );
+            System.Diagnostics.Debug.Assert( aFromRecon1.Address == aFromRecon2.Address );
+            System.Diagnostics.Debug.Assert( aFromRecon2.Type == aFromRecon2.Type );
+            System.Diagnostics.Debug.Assert( aFromRecon1.Length != aFromRecon2.Length );
+
+            if ( aFromRecon1.Type == HeapCell.TType.EFree )
+            {
+                // Free cells, same address, different lengths => [changed]
+                aFromRecon1.Tag = aFromRecon2;
+                iChanged.Add( aFromRecon1 );
+            }
+            else if ( aFromRecon1.Type == HeapCell.TType.EAllocated )
+            {
+                if ( aFromRecon1.IsUnknown && aFromRecon2.IsUnknown )
+                {
+                    // Check if both are descriptors. If they are not, then
+                    // assume unique.
+                    if ( aFromRecon1.IsDescriptor != aFromRecon2.IsDescriptor )
+                    {
+                        // One is a descriptor, one isn't => [unique]
+                        iUniqueInReconstructor1.Add( aFromRecon1 );
+                        iUniqueInReconstructor2.Add( aFromRecon2 );
+                    }
+                    else
+                    {
+                        // Cells with unknown vTables, but at the same address are just assumed to be blobs that
+                        // have grown or shrunk => [changed]
+                        aFromRecon1.Tag = aFromRecon2;
+                        iChanged.Add( aFromRecon1 );
+                    }
+                }
+                else
+                {
+                    uint vt1 = aFromRecon1.IsUnknown ? 0 : aFromRecon1.PossibleVTableAddress;
+                    uint vt2 = aFromRecon2.IsUnknown ? 0 : aFromRecon2.PossibleVTableAddress;
+
+                    // If either vTable is different, then they are [unique]. If the vTables
+                    // are the same, then this is odd - classes with known vTables shouldn't change
+                    // size dynamically?
+                    if ( vt1 == vt2 )
+                    {
+                        // VTables are the same, but somehow the length has
+                        // changed. I don't know what to do about this at the moment so
+                        // am filing the cells in the unique bucket!
+                        iUniqueInReconstructor1.Add( aFromRecon1 );
+                        iUniqueInReconstructor2.Add( aFromRecon2 );
+                    }
+                    else
+                    {
+                        // VTables are different, lengths not the same, types is the same => [unique]
+                        iUniqueInReconstructor1.Add( aFromRecon1 );
+                        iUniqueInReconstructor2.Add( aFromRecon2 );
+                    }
+                }
+            }
+        }
+
+        private static bool CompareCommonContents( HeapCell aLeft, HeapCell aRight )
+        {
+            HeapCell smaller = aLeft;
+            HeapCell larger = aRight;
+            if ( aLeft.RawItems.Count > aRight.RawItems.Count )
+            {
+                smaller = aRight;
+                larger = aLeft;
+            }
+
+            // The payload length is in bytes, the raw item count is in 32 bit words.
+            // They should agree, once multipled by 4 - if not, something is badly borked.
+            // We should probably throw an exception, but try to be tolerant for now...
+            if ( smaller.RawItems.Count * 4 != smaller.PayloadLength )
+            {
+                return false;
+            }
+            else if ( larger.RawItems.Count * 4 != larger.PayloadLength )
+            {
+                return false;
+            }
+
+            int smallerSize = smaller.RawItems.Count;
+            for ( int i = 0; i < smallerSize; i++ )
+            {
+                RawItem itemS = smaller[ i ];
+                RawItem itemL = larger[ i ];
+                //
+                if ( itemS.Data != itemL.Data )
+                {
+                    return false;
+                }
+            }
+
+            return true;
+        }
+
+        private static int CountBySymbol( string aText, HeapCellArray aArray )
+        {
+            int ret = 0;
+            int count = aArray.Count;
+            for ( int i = 0; i < count; i++ )
+            {
+                HeapCell cell = aArray[ i ];
+                string sym = cell.SymbolStringWithoutDescriptorPrefix;
+                if ( sym.Contains( aText ) )
+                {
+                    ++ret;
+                }
+            }
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapReconstructor iReconstructor1;
+        private readonly HeapReconstructor iReconstructor2;
+        //
+        private HeapCellArrayWithStatistics iUnchanged = new HeapCellArrayWithStatistics();
+        private HeapCellArrayWithStatistics iUnchangedLengthButDifferentContents = new HeapCellArrayWithStatistics();
+        private HeapCellArrayWithStatistics iChanged = new HeapCellArrayWithStatistics();
+        private HeapCellArrayWithStatistics iUniqueInReconstructor1 = new HeapCellArrayWithStatistics();
+        private HeapCellArrayWithStatistics iUniqueInReconstructor2 = new HeapCellArrayWithStatistics();
+        #endregion
+    }
+
+    internal class ComparsionCellSupplierProxy : AsyncArrayObjectSupplier<HeapCell>
+    {
+        #region Constructors & destructor
+        public ComparsionCellSupplierProxy( HeapReconstructor aReconstructor )
+        {
+            iReconstructor = aReconstructor;
+        }
+        #endregion
+
+        #region AsyncArrayObjectSupplier<HeapCell> Members
+        public int ObjectCount
+        {
+            get { return iReconstructor.Data.Count; }
+        }
+
+        public HeapCell this[ int aIndex ]
+        {
+            get { return iReconstructor.Data[ aIndex ]; }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapReconstructor iReconstructor;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/ComparsionWriter.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,493 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Globalization;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+using SymbianUtils.Range;
+using SymbianUtils.RawItems;
+using SymbianUtils.TextUtilities.Readers.Types.Array;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using System.Runtime.InteropServices;
+using Microsoft.Office.Interop.Excel;
+using Excel = Microsoft.Office.Interop.Excel;
+using HeapComparisonLib.Data.Pages;
+using SymbianExcelUtils;
+using HeapLib.Statistics.Types;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapLib.Statistics.Tracking.Base;
+
+namespace HeapComparisonLib.Data
+{
+    public class ComparisonWriter : AsyncTextWriterBase
+    {
+        #region Constructors
+        public ComparisonWriter( ComparsionEngine aEngine, string aFileName )
+        {
+            iEngine = aEngine;
+            iFileName = aFileName;
+        }
+        #endregion
+
+        #region API
+        public void SaveAsExcel()
+        {
+            AsyncWrite();
+        }
+        #endregion
+
+        #region Properties
+        #endregion
+
+        #region From AsyncWriterBase
+        protected override void HandleWriteStarted()
+        {
+            // There are problems with exporting to excel on non-English machines
+            // See: http://www.made4dotnet.com/Default.aspx?tabid=141&aid=15
+            iOriginalCulture = System.Threading.Thread.CurrentThread.CurrentCulture;
+            ChangeToEnglishCulture();
+
+            iExcelApp = new Microsoft.Office.Interop.Excel.Application();
+            iExcelApp.DisplayAlerts = false;
+
+            Workbooks workbooks = iExcelApp.Workbooks;
+            workbooks.Add( XlWBATemplate.xlWBATWorksheet );
+            iWorkbook = workbooks.get_Item( workbooks.Count );
+
+            // Create summary sheet
+            Sheets sheets = iWorkbook.Worksheets;
+            iSummary = (Worksheet) sheets.get_Item( 1 );
+            CreateSummary( iSummary );
+
+            // Create pages
+            iPages.Add( new Pages.PageUnchanged( iEngine.ResultsUnchanged, iWorkbook ) );
+            iPages.Add( new Pages.PageUnique( iEngine.Reconstructor2, iEngine.ResultsUniqueInHeap2, iWorkbook, "Unique in Heap 2", 2, 1 ) );
+            iPages.Add( new Pages.PageUnique( iEngine.Reconstructor1, iEngine.ResultsUniqueInHeap1, iWorkbook, "Unique in Heap 1", 1, 2 ) );
+            iPages.Add( new Pages.PageSimpleListing( iEngine.ResultsUnchangedLengthButDifferentContents, iWorkbook, "Same length, different contents" ) );
+            iPages.Add( new Pages.PageSimpleListing( iEngine.ResultsChanged, iWorkbook, "Changed", false ) );
+        }
+
+        protected override void HandleWriteCompleted()
+        {
+            try
+            {
+                base.HandleWriteCompleted();
+
+                // Populate summary sheet
+                FinaliseSummary( iSummary );
+
+                // Activate summary
+                ( (Microsoft.Office.Interop.Excel._Worksheet) iSummary ).Activate();
+
+                // Save and close workbook
+                SaveFile();
+
+                // Exit Excel
+                SymbianExcelUtils.Utils.CloseExcel( iExcelApp );
+            }
+            catch
+            {
+            }
+            finally
+            {
+                RestoreOriginalCulture();
+            }
+        }
+
+        public override void ExportData()
+        {
+            PageBase page = null;
+            //
+            lock ( this )
+            {
+                if ( iCurrentPageIndex < iPages.Count )
+                {
+                    page = iPages[ iCurrentPageIndex++ ];
+                }
+            }
+            //
+            if ( page != null )
+            {
+                page.SaveToPage();
+            }
+        }
+
+        public override long Size
+        {
+            get
+            {
+                long size = 0;
+                lock ( iPages )
+                {
+                    size = iPages.Count;
+                }
+                return size;
+            }
+        }
+
+        public override long Position
+        {
+            get
+            {
+                long pos = 0;
+                lock ( this )
+                {
+                    pos = iCurrentPageIndex;
+                }
+                return pos;
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void SaveFile()
+        {
+            // Delete any existing file with the same name
+            System.IO.FileInfo fileInfo = new System.IO.FileInfo( iFileName );
+            if ( fileInfo.Exists )
+            {
+                fileInfo.Delete();
+            }
+
+            // Save and tidy up
+            try
+            {
+                iWorkbook.SaveAs( iFileName,
+								  XlFileFormat.xlWorkbookNormal,
+								  Type.Missing,
+								  Type.Missing,
+								  Type.Missing,
+								  Type.Missing,
+								  XlSaveAsAccessMode.xlNoChange,
+								  Type.Missing,
+								  Type.Missing,
+								  Type.Missing,
+								  Type.Missing,
+								  Type.Missing );
+            }
+            catch ( System.IO.IOException )
+            {
+            }
+
+            iWorkbook.Close( false, Type.Missing, Type.Missing );
+        }
+
+        private void CreateSummary( Worksheet aSheet )
+        {
+            aSheet.Name = "Summary";
+            //
+            int row = 0;
+            //
+            row++;
+            Utils.SetValue( row, 2, aSheet, "Heap 1" ).AddComment( "From: " + iEngine.Reconstructor1.SourceData.FileName );
+            Utils.SetValue( row, 3, aSheet, "Heap 2" ).AddComment( "From: " + iEngine.Reconstructor2.SourceData.FileName );
+            Utils.SetValue( row, 4, aSheet, "Delta" );
+            Utils.MakeBoxedTitleRow( 1, 4, aSheet, 0xFF0000 );
+        }
+
+        private void FinaliseSummary( Worksheet aSheet )
+        {
+            int row = 1;
+
+            {
+                long heapSize1 = iEngine.Reconstructor1.Statistics.HeapSize;
+                long heapSize2 = iEngine.Reconstructor2.Statistics.HeapSize;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "Heap Chunk Size" );
+                Utils.SetValue( row, 2, aSheet, heapSize1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapSize2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+            }
+
+            // Spacer
+            row++;
+
+            {
+                long heapAllocSize1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TypeSize;
+                long heapAllocSize2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TypeSize;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "Allocated Space" );
+                Utils.SetValue( row, 2, aSheet, heapAllocSize1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapAllocSize2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+
+                long heapAllocCount1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TypeCount;
+                long heapAllocCount2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TypeCount;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "Allocated Cell Count" );
+                Utils.SetValue( row, 2, aSheet, heapAllocCount1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapAllocCount2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+            }
+
+            // Spacer
+            row++;
+
+            {
+                long heapAllocUnknownSize1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerUnknown.AssociatedMemory;
+                long heapAllocUnknownSize2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerUnknown.AssociatedMemory;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "\"Unknown\" Allocated Space" );
+                Utils.SetValue( row, 2, aSheet, heapAllocUnknownSize1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapAllocUnknownSize2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+
+                long heapAllocUnknownCount1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerUnknown.AssociatedCellCount;
+                long heapAllocUnknownCount2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerUnknown.AssociatedCellCount;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "\"Unknown\" Allocated Cell Count" );
+                Utils.SetValue( row, 2, aSheet, heapAllocUnknownCount1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapAllocUnknownCount2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+            }
+
+            // Spacer
+            row++;
+
+            {
+                long heapAllocDesSize1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerDescriptors.AssociatedMemory;
+                long heapAllocDesSize2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerDescriptors.AssociatedMemory;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "Descriptor Allocated Space" );
+                Utils.SetValue( row, 2, aSheet, heapAllocDesSize1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapAllocDesSize2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+
+                long heapAllocDesCount1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount;
+                long heapAllocDesCount2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "Descriptor Allocated Cell Count" );
+                Utils.SetValue( row, 2, aSheet, heapAllocDesCount1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapAllocDesCount2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+
+                /*
+                using ( System.IO.StreamWriter w1 = new System.IO.StreamWriter( "O:\\desc1.txt", false ) )
+                {
+                    foreach ( HeapCell c1 in iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerDescriptors )
+                    {
+                        w1.WriteLine( c1.ToStringExtended() + " " + c1.DescriptorTextBeautified );
+                    }
+                }
+                using ( System.IO.StreamWriter w2 = new System.IO.StreamWriter( "O:\\desc2.txt", false ) )
+                {
+                    foreach ( HeapCell c2 in iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerDescriptors )
+                    {
+                        w2.WriteLine( c2.ToStringExtended() + " " + c2.DescriptorTextBeautified );
+                    }
+                }
+                */
+            }
+
+            // Spacer
+            row++;
+
+            {
+                long typeSize1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerSymbols.TypeSize;
+                long typeSize2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerSymbols.TypeSize;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "\"With Symbols\" Allocated Space" );
+                Utils.SetValue( row, 2, aSheet, typeSize1.ToString() );
+                Utils.SetValue( row, 3, aSheet, typeSize2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+
+                long typeCount1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerSymbols.CellMatchCount;
+                long typeCount2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerSymbols.CellMatchCount;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "\"With Symbols\" Allocated Cell Count" );
+                Utils.SetValue( row, 2, aSheet, typeCount1.ToString() );
+                Utils.SetValue( row, 3, aSheet, typeCount2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+            }
+
+            // Spacer
+            row++;
+            int freeRow = row;
+
+            {
+                long heapFreeSize1 = iEngine.Reconstructor1.Statistics.StatsFree.TypeSize;
+                long heapFreeSize2 = iEngine.Reconstructor2.Statistics.StatsFree.TypeSize;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "Free Space" );
+                Utils.SetValue( row, 2, aSheet, heapFreeSize1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapFreeSize2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+
+                long heapFreeCount1 = iEngine.Reconstructor1.Statistics.StatsFree.TypeCount;
+                long heapFreeCount2 = iEngine.Reconstructor2.Statistics.StatsFree.TypeCount;
+                row++;
+                Utils.SetValue( row, 1, aSheet, "Free Cell Count" );
+                Utils.SetValue( row, 2, aSheet, heapFreeCount1.ToString() );
+                Utils.SetValue( row, 3, aSheet, heapFreeCount2.ToString() );
+                Utils.SetValue( row, 4, aSheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 3 ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 2 ) );
+            }
+
+            // Spacer
+            row++;
+            row++;
+            Utils.SetValue( row, 1, aSheet, "Symbol" );
+            Utils.SetValue( row, 2, aSheet, "Heap 1" ).AddComment( "Associated cell count from: " + iEngine.Reconstructor1.SourceData.FileName );
+            Utils.SetValue( row, 3, aSheet, "Heap 2" ).AddComment( "Associated cell count from: " + iEngine.Reconstructor2.SourceData.FileName );
+            Utils.SetValue( row, 4, aSheet, "Delta" );
+            Utils.MakeBoxedTitleRow( row, 4, aSheet, 0xFF0000 );
+
+            row++;
+            int firstSymbolRow = row;
+
+            // Trackers for both heaps
+            SymbolTrackingInfoCollection tracker1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerSymbols;
+            SymbolTrackingInfoCollection tracker2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerSymbols;
+
+            // We need a row for unknown items
+            {
+                Utils.SetValue( row, 1, aSheet, "Unknown" );
+                int count1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerUnknown.AssociatedCellCount;
+                int count2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerUnknown.AssociatedCellCount;
+                Utils.SetValue( row, 2, aSheet, count1.ToString() );
+                Utils.SetValue( row, 3, aSheet, count2.ToString() );
+                Utils.SetValue( row, 4, aSheet, ( count2 - count1 ).ToString() );
+                row++;
+            }
+
+            // We need a row for descriptor items
+            {
+                Utils.SetValue( row, 1, aSheet, "Descriptors" );
+                int count1 = iEngine.Reconstructor1.Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount;
+                int count2 = iEngine.Reconstructor2.Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount;
+                Utils.SetValue( row, 2, aSheet, count1.ToString() );
+                Utils.SetValue( row, 3, aSheet, count2.ToString() );
+                Utils.SetValue( row, 4, aSheet, ( count2 - count1 ).ToString() );
+                row++;
+            }
+
+            // Symbols from heap 1
+            List<TrackingInfo> uniqueInHeap2 = new List<TrackingInfo>();
+            foreach ( TrackingInfo info in tracker1 )
+            {
+                System.Diagnostics.Debug.Assert( info.IsUnknownSymbolMatchItem == false );
+
+                int count1 = info.Count;
+                int count2 = 0;
+                TrackingInfo info2 = tracker2[ info.Symbol ];
+                if ( info2 != null )
+                {
+                    count2 = info2.Count;
+                }
+
+                row++;
+                Utils.SetValue( row, 2, aSheet, count1.ToString() );
+                Utils.SetValue( row, 1, aSheet, info.Symbol.NameWithoutVTablePrefix );
+                Utils.SetValue( row, 3, aSheet, count2.ToString() );
+                Utils.SetValue( row, 4, aSheet, ( count2 - count1 ).ToString() );
+
+                // Must remove the item so we can spot any types that were new in heap 2
+                tracker2.Remove( info );
+            }
+
+            // The remaining items in tracker2 had no corresponding entries in tracker1
+            foreach ( TrackingInfo info in tracker2 )
+            {
+                System.Diagnostics.Debug.Assert( info.IsUnknownSymbolMatchItem == false );
+                row++;
+                Utils.SetValue( row, 1, aSheet, info.Symbol.NameWithoutVTablePrefix );
+                Utils.SetValue( row, 2, aSheet, "0" );
+                Utils.SetValue( row, 3, aSheet, info.Count.ToString() );
+                Utils.SetValue( row, 4, aSheet, info.Count.ToString() );
+            }
+
+            // Set the number format for the delta column
+            Range allocRange = Utils.GetRangeByColumnAndRow( 2, 4, row, 4, aSheet );
+            allocRange.NumberFormat = "[Red]0;[Blue]-0;[Black]0;";
+
+            // Except for the free cells, which have the colour highlighting the other way around
+            Range freeRange = Utils.GetRangeByColumnAndRow( freeRow, 4, freeRow + 1, 4, aSheet );
+            freeRange.NumberFormat = "[Blue]0;[Red]-0;[Black]0;";
+
+            // Sort by delta
+            Excel.Range masterSortCell = (Excel.Range) aSheet.Cells[ 1, 4 ];
+            Excel.Range range = Utils.GetRangeByColumnAndRow( firstSymbolRow, 1, row, 4, aSheet );
+            range.Sort( masterSortCell.Columns[ 1, Type.Missing ], Microsoft.Office.Interop.Excel.XlSortOrder.xlDescending,
+                        Type.Missing, Type.Missing, Microsoft.Office.Interop.Excel.XlSortOrder.xlDescending,
+                        Type.Missing, Microsoft.Office.Interop.Excel.XlSortOrder.xlDescending, Microsoft.Office.Interop.Excel.XlYesNoGuess.xlNo,
+                        Type.Missing, Type.Missing,
+                        Microsoft.Office.Interop.Excel.XlSortOrientation.xlSortColumns,
+                        Microsoft.Office.Interop.Excel.XlSortMethod.xlPinYin,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal );
+
+            // Summation of deltas
+            string sumForm = Utils.MakeSummationFormula( firstSymbolRow, row, 4, aSheet );
+            Utils.SetValue( row + 2, 4, aSheet, sumForm );
+
+            Utils.BoldColumn( 1, aSheet );
+            Utils.AutoFitColumnNoMax( 1, aSheet );
+        }
+        
+        private void ChangeToEnglishCulture()
+        {
+            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
+        }
+        
+        private void RestoreOriginalCulture()
+        {
+            System.Threading.Thread.CurrentThread.CurrentCulture = iOriginalCulture;
+        }
+        #endregion
+
+        #region Internal callback methods
+        #endregion
+
+        #region Data members
+        private readonly ComparsionEngine iEngine;
+        private readonly string iFileName;
+        private CultureInfo iOriginalCulture;
+        private Application iExcelApp = null;
+        private Workbook iWorkbook = null;
+        private Worksheet iSummary = null;
+        private int iCurrentPageIndex = 0;
+        private List<PageBase> iPages = new List<PageBase>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Office.Interop.Excel;
+using HeapLib.Cells;
+using HeapLib.Array;
+using SymbianExcelUtils;
+
+namespace HeapComparisonLib.Data.Pages
+{
+    internal abstract class PageBase
+    {
+        #region Constructors & destructor
+        public PageBase( HeapCellArrayWithStatistics aArray, Workbook aWorkbook, string aSheetName )
+        {
+            iArray = aArray;
+            iWorkbook = aWorkbook;
+            iWorksheet = (Worksheet) iWorkbook.Sheets.Add( iWorkbook.Sheets.get_Item( 1 ), Type.Missing, 1, XlSheetType.xlWorksheet );
+            iWorksheet.Name = aSheetName;
+        }
+        #endregion
+
+        #region Properties
+        public HeapCellArrayWithStatistics Array
+        {
+            get { return iArray; }
+        }
+
+        public Workbook Workbook
+        {
+            get { return iWorkbook; }
+        }
+
+        public Worksheet Worksheet
+        {
+            get { return iWorksheet; }
+        }
+        #endregion
+
+        #region API
+        public abstract void SaveToPage();
+        #endregion
+
+        #region Internal methods
+        protected void AutoFitColumns( int aStart, int aEnd )
+        {
+            iWorksheet.Activate();
+
+            for ( int i = aStart; i <= aEnd; i++ )
+            {
+                Utils.AutoFitColumnNoMax( i, Worksheet );
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCellArrayWithStatistics iArray;
+        private readonly Workbook iWorkbook;
+        private readonly Worksheet iWorksheet;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageSimpleListing.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,344 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Office.Interop.Excel;
+using Excel = Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+
+namespace HeapComparisonLib.Data.Pages
+{
+    internal class PageSimpleListing : PageBase
+    {
+        #region Constructors & destructor
+        public PageSimpleListing( HeapCellArrayWithStatistics aArray, Workbook aWorkbook, string aCaption )
+            : this( aArray, aWorkbook, aCaption, true )
+        {
+        }
+
+        public PageSimpleListing( HeapCellArrayWithStatistics aArray, Workbook aWorkbook, string aCaption, bool aMakeStats )
+            : this( aArray, aWorkbook, aCaption, 1, 2 )
+        {
+            iMakeStats = aMakeStats;
+        }
+
+        public PageSimpleListing( HeapCellArrayWithStatistics aArray, Workbook aWorkbook, string aCaption, int aMasterCol, int aOtherCol )
+            : base( aArray, aWorkbook, aCaption )
+        {
+            iMasterCol = aMasterCol;
+            iOtherCol = aOtherCol;
+            iMakeStats = true;
+        }
+        #endregion
+
+        #region New framework
+        protected virtual int MakeExtraColumns( int aRow )
+        {
+            return 0;
+        }
+
+        protected virtual void OnTableComplete( int aLastRow )
+        {
+        }
+
+        protected virtual void OnRowComplete( HeapCell aCell, int aRow, int aNextFreeColumn )
+        {
+        }
+        #endregion
+
+        #region API
+        public override void SaveToPage()
+        {        
+            int row = 1;
+            if ( iMakeStats )
+            {
+                MakeStats( ref row );
+            }
+
+            Utils.SetValue( row, 1, Worksheet, "Alloc Cell Address" );
+            Utils.SetValue( row, 2, Worksheet, "Original Length" );
+            Utils.SetValue( row, 3, Worksheet, "New Length" );
+            Utils.SetValue( row, 4, Worksheet, "Symbol" );
+
+            // Make row bold
+            Utils.BoldRow( row, Worksheet );
+
+            // Add border and cell colours
+            int maxCol = Math.Max( 4, MakeExtraColumns( row ) );
+            Utils.MakeBoxedTitleRow( row, maxCol, Worksheet, 0xFF0000 );
+
+            // Set column alignments
+            Utils.SetColumnHorizontalAlignment( 2, Worksheet, XlHAlign.xlHAlignRight );
+            Utils.SetColumnHorizontalAlignment( 3, Worksheet, XlHAlign.xlHAlignRight );
+            Utils.SetColumnHorizontalAlignment( 4, Worksheet, XlHAlign.xlHAlignLeft );
+
+            // Create rows for allocs
+            row++;
+
+            int startRowAlloc = row;
+            foreach ( HeapCell cell in Array )
+            {
+                if ( cell.Type == HeapCell.TType.EAllocated )
+                {
+                    object[ , ] items = new object[ 1, 4 ];
+                    //
+                    items[ 0, 0 ] = "0x" + cell.Address.ToString( "x8" );
+
+                    // Put the length in the master cell and then
+                    // if we have a value for the other column, put it's value too
+                    items[ 0, iMasterCol ] = cell.Length.ToString();
+                    if ( cell.Tag != null && cell.Tag is HeapCell )
+                    {
+                        HeapCell newCell = (HeapCell) cell.Tag;
+                        items[ 0, iOtherCol ] = newCell.Length;
+                    }
+                    else
+                    {
+                        items[ 0, iOtherCol ] = "?";
+                    }
+
+                    // Cell description
+                    if ( !cell.IsUnknown )
+                    {
+                        items[ 0, 3 ] = cell.SymbolStringWithoutDescriptorPrefix;
+                    }
+                    else if ( cell.IsDescriptor )
+                    {
+                        items[ 0, 3 ] = cell.SymbolStringWithoutDescriptorPrefix;
+                    }
+                    else
+                    {
+                        StringBuilder body = new StringBuilder();
+                        body.AppendFormat( "[?] I[{0:d3}] O[{1:d3}] {2}", cell.RelationshipManager.ReferencedBy.Count, cell.RelationshipManager.EmbeddedReferencesTo.Count, cell.RawItems.FirstLine );
+                        items[ 0, 3 ] = body.ToString();
+                    }
+                    //
+                    Range range = Utils.GetRangeByColumnAndRow( row, 1, row, 4, Worksheet );
+                    range.Value2 = items;
+                    OnRowComplete( cell, row, 5 );
+                    ++row;
+                }
+            }
+
+            // Sort allocations by symbol
+            Excel.Range sortRange = Utils.GetRangeByColumnAndRow( startRowAlloc, 1, row, maxCol, Worksheet );
+            sortRange.Sort(
+                        Worksheet.Columns[ 4, Type.Missing ], Microsoft.Office.Interop.Excel.XlSortOrder.xlDescending,
+                        Type.Missing, Type.Missing, Microsoft.Office.Interop.Excel.XlSortOrder.xlDescending,
+                        Type.Missing, Microsoft.Office.Interop.Excel.XlSortOrder.xlDescending, Microsoft.Office.Interop.Excel.XlYesNoGuess.xlNo,
+                        Type.Missing, Type.Missing,
+                        Microsoft.Office.Interop.Excel.XlSortOrientation.xlSortColumns,
+                        Microsoft.Office.Interop.Excel.XlSortMethod.xlPinYin,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal,
+                        Microsoft.Office.Interop.Excel.XlSortDataOption.xlSortNormal );
+
+            // Write totals
+            ++row;
+            Utils.SetValue( row, 1, Worksheet, "Total" );
+            Utils.SetValue( row, 1 + iMasterCol, Worksheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( startRowAlloc, 1 + iMasterCol ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( row - 1, 1 + iMasterCol ) + ")" );
+            Utils.SetValue( row, 1 + iOtherCol, Worksheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( startRowAlloc, 1 + iOtherCol ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( row - 1, 1 + iOtherCol ) + ")" );
+            Utils.SetValue( row, 4, Worksheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 1 + iMasterCol ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 1 + iOtherCol ) );
+            Utils.BoldRow( row, Worksheet );
+            
+            // Spacers
+            row += 3;
+
+            // Do the same for free cells
+            Utils.SetValue( row, 1, Worksheet, "Free Cell Address" );
+            Utils.SetValue( row, 2, Worksheet, "Original Length" );
+            Utils.SetValue( row, 3, Worksheet, "New Length" );
+            Utils.SetValue( row, 4, Worksheet, "Symbol" );
+
+            // Make row bold
+            Utils.BoldRow( row, Worksheet );
+
+            // Add border and cell colours
+            Utils.MakeBoxedTitleRow( row, 4, Worksheet, 0xFF0000 );
+
+            // Create rows for frees
+            ++row;
+            int startRowFree = row;
+            foreach ( HeapCell cell in Array )
+            {
+                if ( cell.Type == HeapCell.TType.EFree )
+                {
+                    object[ , ] items = new object[ 1, 4 ];
+                    //
+                    items[ 0, 0 ] = "0x" + cell.Address.ToString( "x8" );
+
+                    // Put the length in the master cell and then
+                    // if we have a value for the other column, put it's value too
+                    items[ 0, iMasterCol ] = cell.Length.ToString();
+                    if ( cell.Tag != null && cell.Tag is HeapCell )
+                    {
+                        HeapCell newCell = (HeapCell) cell.Tag;
+                        items[ 0, iOtherCol ] = newCell.Length;
+                    }
+                    else
+                    {
+                        items[ 0, iOtherCol ] = "?";
+                    }
+                    items[ 0, 3 ] = cell.SymbolStringWithoutDescriptorPrefix;
+                    //
+                    Range range = Utils.GetRangeByColumnAndRow( row, 1, row, 4, Worksheet );
+                    range.Value2 = items;
+                    ++row;
+                }
+            }
+
+            // Write totals
+            ++row;
+            Utils.SetValue( row, 1, Worksheet, "Total" );
+            Utils.SetValue( row, 1 + iMasterCol, Worksheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( startRowFree, 1 + iMasterCol ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( row - 1, 1 + iMasterCol ) + ")" );
+            Utils.SetValue( row, 1 + iOtherCol, Worksheet, "=SUM(" + Utils.ColumnAndRowAsExcelIdentifier( startRowFree, 1 + iOtherCol ) + ":" + Utils.ColumnAndRowAsExcelIdentifier( row - 1, 1 + iOtherCol ) + ")" );
+            Utils.SetValue( row, 4, Worksheet, "=" + Utils.ColumnAndRowAsExcelIdentifier( row, 1 + iMasterCol ) + "-" + Utils.ColumnAndRowAsExcelIdentifier( row, 1 + iOtherCol ) );
+            Utils.BoldRow( row, Worksheet );
+
+            // Auto fit the columns
+            AutoFitColumns( 1, 4 );
+            OnTableComplete( row );
+        }
+        #endregion
+
+        #region Internal methods
+        private void MakeStats( ref int aRow )
+        {
+            Utils.SetValue( aRow, 1, Worksheet, "Type" );
+            Utils.SetValue( aRow, 2, Worksheet, "Amount" );
+
+            // Make row bold
+            Utils.BoldRow( aRow, Worksheet );
+
+            // Add border and cell colours
+            Utils.MakeBoxedTitleRow( aRow, 2, Worksheet, 0xFF0000 );
+
+            // Set column alignments
+            Utils.SetColumnHorizontalAlignment( 2, Worksheet, XlHAlign.xlHAlignRight );
+
+            // Spacer
+            aRow++;
+            int firstRealRow = aRow;
+            
+            HeapStatistics stats = Array.Statistics;
+
+            {
+                Utils.SetValue( aRow, 1, Worksheet, "Total" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.SizeTotal.ToString() );
+            }
+
+            // Spacer
+            aRow++;
+
+            {
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "Allocated Space" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TypeSize.ToString() );
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "Allocated Cell Count" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TypeCount.ToString() );
+            }
+
+            // Spacer
+            aRow++;
+
+            {
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "\"Unknown\" Allocated Space" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TrackerUnknown.AssociatedMemory.ToString() );
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "\"Unknown\" Allocated Cell Count" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TrackerUnknown.AssociatedCellCount.ToString() );
+            }
+
+            // Spacer
+            aRow++;
+
+            {
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "Descriptor Allocated Space" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TrackerDescriptors.AssociatedMemory.ToString() );
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "Descriptor Allocated Cell Count" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TrackerDescriptors.AssociatedCellCount.ToString() );
+            }
+
+            // Spacer
+            aRow++;
+
+            {
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "\"With Symbols\" Allocated Space" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TrackerSymbols.TypeSize.ToString() );
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "\"With Symbols\" Allocated Cell Count" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsAllocated.TrackerSymbols.CellMatchCount.ToString() );
+            }
+
+            // Spacer
+            aRow++;
+            int freeaRow = aRow;
+
+            {
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "Free Space" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsFree.TypeSize.ToString() );
+                aRow++;
+                Utils.SetValue( aRow, 1, Worksheet, "Free Cell Count" );
+                Utils.SetValue( aRow, 2, Worksheet, stats.StatsFree.TypeCount.ToString() );
+            }
+
+            Utils.GetRangeByColumnAndRow( firstRealRow, 1, aRow, 1, Worksheet ).Font.Bold = true;
+
+            // Spacer
+            aRow++;
+            aRow++;
+        }
+        #endregion
+
+        #region Data members
+        private readonly int iMasterCol;
+        private readonly int iOtherCol;
+        private readonly bool iMakeStats;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageUnchanged.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+using HeapLib.Cells;
+using HeapLib.Array;
+
+namespace HeapComparisonLib.Data.Pages
+{
+    internal class PageUnchanged : PageSimpleListing
+    {
+        #region Constructors & destructor
+        public PageUnchanged( HeapCellArrayWithStatistics aArray, Workbook aWorkbook )
+            : base( aArray, aWorkbook, "Unchanged" )
+        {
+        }
+        #endregion
+
+        #region API
+        public override void SaveToPage()
+        {
+            base.SaveToPage();
+        }
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Data/Pages/PageUnique.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Office.Interop.Excel;
+using SymbianExcelUtils;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+
+namespace HeapComparisonLib.Data.Pages
+{
+    internal class PageUnique : PageSimpleListing
+    {
+        #region Constructors & destructor
+        public PageUnique( HeapReconstructor aReconstructor, HeapCellArrayWithStatistics aArray, Workbook aWorkbook, string aCaption, int aMasterCol, int aOtherCol )
+            : base( aArray, aWorkbook, aCaption, aMasterCol, aOtherCol )
+        {
+            iReconstructor = aReconstructor;
+        }
+        #endregion
+
+        #region API
+        public override void SaveToPage()
+        {
+            base.SaveToPage();
+        }
+
+        protected override int MakeExtraColumns( int aRow )
+        {
+            Utils.SetValue( aRow, 5, Worksheet, "Program Counter" );
+            Utils.SetValue( aRow, 6, Worksheet, "Link Register" );
+            Utils.SetColumnHorizontalAlignment( 5, Worksheet, XlHAlign.xlHAlignLeft );
+            Utils.SetColumnHorizontalAlignment( 6, Worksheet, XlHAlign.xlHAlignLeft );
+            return 6;
+        }
+
+        protected override void OnTableComplete( int aLastRow )
+        {
+            Utils.AutoFitColumn( 5, Worksheet );
+            Utils.AutoFitColumn( 6, Worksheet );
+        }
+
+        protected override void OnRowComplete( HeapCell aCell, int aRow, int aNextFreeColumn )
+        {
+            if ( iReconstructor.SourceData.MetaData.Heap.IsDebugAllocatorWithStoredStackAddresses )
+            {
+                if ( aCell.IsUnknown && aCell.Type == HeapCell.TType.EAllocated )
+                {
+                    object[ , ] items = new object[ 1, 2 ];
+
+                    if ( aCell.Symbol2 != null )
+                    {
+                        items[ 0, 0 ] = aCell.Symbol2.Name;
+                    }
+                    else
+                    {
+                        items[ 0, 0 ] = string.Empty;
+                    }
+
+                    if ( aCell.Symbol3 != null )
+                    {
+                        items[ 0, 1 ] = aCell.Symbol3.Name;
+                    }
+                    else
+                    {
+                        items[ 0, 1 ] = string.Empty;
+                    }
+
+                    Range range = Utils.GetRangeByColumnAndRow( aRow, 5, aRow, 6, Worksheet );
+                    range.Value2 = items;
+                }
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapReconstructor iReconstructor;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/HeapComparisonLib.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,122 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{0911ECEE-D330-4DE9-989C-8181604FAAB5}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeapComparisonLib</RootNamespace>
+    <AssemblyName>HeapComparisonLib</AssemblyName>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="CSV\DataSet\CSVDataSetCollection.cs" />
+    <Compile Include="CSV\Engine\CSVComparisonEngine.cs" />
+    <Compile Include="CSV\Excel\CSVExcelExporterAllDataSets.cs" />
+    <Compile Include="CSV\Thread\CSVThreadPair.cs" />
+    <Compile Include="CSV\Thread\CSVThread.cs" />
+    <Compile Include="CSV\DataSet\CSVDataSet.cs" />
+    <Compile Include="CSV\Excel\CSVExcelExporterTwoDataSets.cs" />
+    <Compile Include="CSV\Thread\CSVThreadParser.cs" />
+    <Compile Include="CSV\Thread\Parsers\CSVThreadParserFormatNew.cs" />
+    <Compile Include="CSV\Thread\Parsers\CSVThreadParserFormatOld.cs" />
+    <Compile Include="CSV\Workers\CSVWorkerAllDataSetComparator.cs" />
+    <Compile Include="CSV\Workers\CSVWorkerLogSplitter.cs" />
+    <Compile Include="CSV\Workers\CSVWorkerTwoDataSetComparator.cs" />
+    <Compile Include="Data\ComparsionEngine.cs" />
+    <Compile Include="Data\ComparsionWriter.cs" />
+    <Compile Include="Data\Pages\PageBase.cs" />
+    <Compile Include="Data\Pages\PageSimpleListing.cs" />
+    <Compile Include="Data\Pages\PageUnchanged.cs" />
+    <Compile Include="Data\Pages\PageUnique.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="CSV\Comparers\CellCounts.cs" />
+    <Compile Include="CSV\Comparers\ComparerBase.cs" />
+    <Compile Include="CSV\Comparers\Fragmentation.cs" />
+    <Compile Include="CSV\Comparers\HeapSize.cs" />
+    <Compile Include="CSV\Comparers\LargestCells.cs" />
+    <Compile Include="CSV\Comparers\SlackSpace.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianExcelLib\SymbianExcelLib.csproj">
+      <Project>{13A8433A-108C-4EF2-9283-70FC6C549E74}</Project>
+      <Name>SymbianExcelLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianStructuresLib\SymbianStructuresLib.csproj">
+      <Project>{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}</Project>
+      <Name>SymbianStructuresLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeapLib\HeapLib.csproj">
+      <Project>{D638AB12-FC64-4523-9B99-09F20BC2A791}</Project>
+      <Name>HeapLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <COMReference Include="Microsoft.Office.Core">
+      <Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
+      <VersionMajor>2</VersionMajor>
+      <VersionMinor>3</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>primary</WrapperTool>
+      <Isolated>False</Isolated>
+      <Private>True</Private>
+    </COMReference>
+    <COMReference Include="VBIDE">
+      <Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
+      <VersionMajor>5</VersionMajor>
+      <VersionMinor>3</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>primary</WrapperTool>
+      <Isolated>False</Isolated>
+      <Private>True</Private>
+    </COMReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PostBuildEvent>copy /Y $(TargetDir)\Microsoft.Office.Interop.Excel.dll $(SolutionDir)\$(OutDir) &amp;&amp; copy /Y $(TargetDir)\office.dll $(SolutionDir)\$(OutDir) &amp;&amp; copy /Y $(TargetDir)\Microsoft.Vbe.Interop.dll $(SolutionDir)\$(OutDir) 
+</PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapComparisonLib/Properties/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeapComparisonLib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Nokia")]
+[assembly: AssemblyProduct("HeapComparisonLib")]
+[assembly: AssemblyCopyright("Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("41ac2aae-5f47-40b2-a098-03b48e068df8")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.1.0.*")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArray.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,216 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+using SymbianUtils.Collections;
+
+namespace HeapLib.Array
+{
+	public class HeapCellArray : HeapCellArrayBase
+	{
+		#region Constructors & destructor
+		public HeapCellArray()
+            : this( 100 )
+		{
+		}
+
+		public HeapCellArray( int aGranularity )
+		{
+            iComparer = new HeapCellComparerByAddress();
+            iSortedList = new SortedList<uint, HeapCell>();
+            iFlatList = new List<HeapCell>( aGranularity );
+		}
+
+		public HeapCellArray( HeapCellArray aCopy )
+            : this( aCopy.Count + 1 )
+		{
+			foreach( HeapCell cell in aCopy )
+			{
+				Add( cell );
+			}
+		}
+		#endregion
+
+		#region API
+        public override void Clear()
+        {
+            iFlatList.Clear();
+            iSortedList.Clear();
+        }
+
+        public override void Add( HeapCell aCell )
+        {
+            uint address = aCell.Address;
+            //
+            iSortedList.Add( address, aCell );
+            //
+            int insertPos = iFlatList.BinarySearch( aCell, iComparer );
+            System.Diagnostics.Debug.Assert( insertPos < 0 );
+            insertPos = ~insertPos;
+            iFlatList.Insert( insertPos, aCell );
+        }
+
+        public override void Remove( HeapCell aCell )
+        {
+            uint address = aCell.Address;
+            if ( iSortedList.ContainsKey( address ) )
+            {
+                HeapCell c = iSortedList[ address ];
+                iSortedList.Remove( address );
+                iFlatList.Remove( c );
+            }
+        }
+
+        public override int CellIndex( HeapCell aCell )
+		{
+            int ret = -1;
+            //
+            uint address = aCell.Address;
+            int pos = iFlatList.BinarySearch( aCell, iComparer );
+            if ( pos >= 0 )
+            {
+                ret = pos;
+            }
+            //
+			return ret;
+		}
+
+        public override HeapCell CellByAddress( uint aAddress, out int aIndex )
+        {
+            HeapCell ret = null;
+
+            // If we're using an address-based comparer, we can optimise the lookup.
+            // Otherwise, we have to fall back to the slow iterative base class algorithm.
+            if ( iComparer is HeapCellComparerByAddress )
+            {
+                HeapCell temp = new HeapCell( aAddress, 0, HeapCell.TType.EAllocated );
+                aIndex = iFlatList.BinarySearch( temp, iComparer );
+                if ( aIndex < 0 )
+                {
+                    // There wasn't an exact match, so the binary search algorithm returns
+                    // us the next largest entry - or in other words, the insertion point
+                    // if we were about to insert a new cell into the list.
+                    //
+                    // Because we want to locate the cell that contains the specified
+                    // address value, then most likely it's the prior cell.
+                    aIndex = ~aIndex - 1;
+                }
+                if ( aIndex >= 0 && aIndex < iFlatList.Count )
+                {
+                    ret = iFlatList[ aIndex ];
+                }
+                else
+                {
+                    aIndex = -1;
+                }
+            }
+            else
+            {
+                ret = base.CellByAddress( aAddress, out aIndex );
+            }
+            //
+            return ret;
+        }
+      
+        public override HeapCell CellByExactAddress( uint aAddress, out int aIndex )
+        {
+            aIndex = -1;
+            HeapCell ret = null;
+            iSortedList.TryGetValue( aAddress, out ret );
+            if ( ret != null )
+            {
+                aIndex = CellIndex( ret );
+            }
+            return ret;
+        }
+        #endregion
+
+		#region Properties
+		public override int Count
+		{
+            get { return iFlatList.Count; }
+		}
+
+        public override HeapCell this[ int aIndex ]
+		{
+            get
+            {
+                HeapCell ret = iFlatList[ aIndex ];
+                return ret;
+            }
+		}
+		#endregion
+
+        #region Sorting
+        public void SortByAddress()
+        {
+            IComparer<HeapCell> comparer = new HeapCellComparerByAddress();
+            Sort( comparer );
+        }
+
+        public void SortByType()
+        {
+            IComparer<HeapCell> comparer = new HeapCellComparerByType();
+            Sort( comparer );
+        }
+
+        public void SortByLength()
+        {
+            IComparer<HeapCell> comparer = new HeapCellComparerByLength();
+            Sort( comparer );
+        }
+        #endregion
+
+        #region Internal methods
+        private void Sort( IComparer<HeapCell> aComparer )
+        {
+            iComparer = aComparer;
+            iFlatList.Sort( iComparer );
+        }
+        #endregion
+
+		#region Data members
+        private IComparer<HeapCell> iComparer = null;
+        private List<HeapCell> iFlatList = new List<HeapCell>();
+        private SortedList<uint, HeapCell> iSortedList = new SortedList<uint, HeapCell>();
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayAllocationNumberMap.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using HeapLib.Array;
+using HeapLib.Cells;
+using SymbianUtils.Range;
+
+namespace HeapLib.Array
+{
+	internal class HeapCellArrayAllocationNumberMap
+	{
+        #region Constructors & destructor
+        public HeapCellArrayAllocationNumberMap( HeapCellArrayBase aArray )
+		{
+            int index = 0;
+            /*
+            System.IO.StreamWriter w = new System.IO.StreamWriter( "C:\\temp\\temp.txt", false );
+             */
+            foreach( HeapCell cell in aArray )
+            {
+                if  ( cell.Type == HeapCell.TType.EAllocated )
+                {
+                    uint allocNum = cell.AllocationNumber;
+                    //
+                    iRange.UpdateMin( allocNum );
+                    iRange.UpdateMax( allocNum );
+                    //
+                    if  ( !iTable.ContainsKey( allocNum ) )
+                    {
+                        iTable.Add( allocNum, index );
+                        //w.WriteLine( "      Alloc#: " + allocNum.ToString("d8") + ", addr: 0x" + cell.Address.ToString("x8") + ", indx: " + index.ToString() );
+                    }
+                    else
+                    {
+                        //w.WriteLine( "DUPE  Alloc#: " + allocNum.ToString("d8") + ", addr: 0x" + cell.Address.ToString("x8") );
+                    }
+                }
+                ++index;
+            }
+            //w.Close();
+            //
+            iEntries = aArray;
+		}
+        #endregion
+
+        #region API
+        public bool InRange( uint aAllocNum )
+        {
+            return iRange.Contains( aAllocNum );
+        }
+        #endregion
+
+        #region Properties
+        public HeapCell this[ uint aAllocNum ]
+        {
+            get
+            {
+                HeapCell ret = null;
+                //
+                object indexObj = iTable[ aAllocNum ];
+                if  ( indexObj != null )
+                {
+                    int index = (int) indexObj;
+                    if  ( index >= 0 && index < iEntries.Count )
+                    {
+                        ret = iEntries[ index ];
+                    }
+                }
+                //
+                return ret;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCellArrayBase iEntries;
+        private Hashtable iTable = new Hashtable();
+        private SymbianUtils.Range.AddressRange iRange = new AddressRange();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,343 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+
+namespace HeapLib.Array
+{
+	public abstract class HeapCellArrayBase : IEnumerable<HeapCell>
+	{
+		#region Constructors & destructor
+		public HeapCellArrayBase()
+        {
+		}
+		#endregion
+
+		#region API - abstract
+        public abstract void Clear();
+
+        public abstract void Add( HeapCell aCell );
+
+        public abstract void Remove( HeapCell aCell );
+
+        public abstract int CellIndex( HeapCell aCell );
+        #endregion
+
+        #region API
+        public bool Contains( HeapCell aCell )
+        {
+            bool exists = CellByAddress( aCell.Address ) != null;
+            return exists;
+        }
+
+        public HeapCell CellByAddress( uint aAddress )
+		{
+			int index = 0;
+            HeapCell ret = CellByAddress( aAddress, out index );
+            return ret;
+		}
+
+        public HeapCell CellByExactAddress( uint aAddress )
+		{
+            int index = 0;
+            HeapCell ret = CellByExactAddress( aAddress, out index );
+            return ret;
+        }
+
+        public virtual HeapCell CellByAddress( uint aAddress, out int aIndex )
+        {
+            HeapCell ret = null;
+            aIndex = -1;
+            //
+            int i = 0;
+            foreach( HeapCell cell in this )
+            {
+                HeapCell.TRegion region = cell.RegionForAddress( aAddress );
+                //
+                if	( region == HeapCell.TRegion.EHeader || region == HeapCell.TRegion.EPayload )
+                {
+                    aIndex = i;
+                    ret = cell;
+                    break;
+                }
+                else
+                {
+                    i++;
+                }
+            }
+            //
+            return ret;
+        }
+
+        public virtual HeapCell CellByExactAddress( uint aAddress, out int aIndex )
+        {
+            aIndex  = -1;
+            HeapCell dummyCell = new HeapCell();
+            dummyCell.Address = aAddress;
+            //
+            HeapCell ret = null;
+            int index = CellIndex( dummyCell );
+            //
+            if	( index >= 0 && index < Count )
+            {
+                ret = this[ index ];
+                aIndex = index;
+            }
+            //
+            return ret;
+        }
+
+		public HeapCell CellByAllocationNumber( uint aNumber )
+		{
+            int index;
+            return CellByAllocationNumber( aNumber, out index );
+		}
+
+        public HeapCell CellByAllocationNumber( uint aNumber, out int aIndex )
+        {
+            HeapCell ret = null;
+            //
+            aIndex = -1;
+            int index = 0;
+            foreach( HeapCell cell in this )
+            {
+                if	( cell.Type == HeapCell.TType.EAllocated && cell.AllocationNumber == aNumber )
+                {
+                    ret = cell;
+                    aIndex = index;
+                    break;
+                }
+                ++index;
+            }
+            //
+            return ret;
+        }
+
+        public HeapCell CellByAllocationNumberIndexed( uint aNumber, int aDelta )
+        {
+            if  ( iAllocMap == null )
+            {
+                iAllocMap = new HeapCellArrayAllocationNumberMap( this );
+            }
+            //
+            HeapCell cell = null;
+            uint nextAllocNum = (uint) ( aNumber + aDelta );
+            //
+            while( cell == null && iAllocMap.InRange( nextAllocNum ) )
+            {
+                cell = iAllocMap[ nextAllocNum ];
+                nextAllocNum = (uint) ( nextAllocNum + aDelta );
+            }
+            //
+            return cell;
+        }
+
+        public bool AllocationNumberInRange( uint aNumber )
+        {
+            if  ( iAllocMap == null )
+            {
+                iAllocMap = new HeapCellArrayAllocationNumberMap( this );
+            }
+            //
+            return iAllocMap.InRange( aNumber );
+        }
+
+        public IEnumerator<HeapCell> CreateEnumerator()
+        {
+            return new HeapCellArrayEnumerator( this );
+        }
+
+        public void Copy( HeapCellArray aArray )
+        {
+            foreach ( HeapCell cell in aArray )
+            {
+                Add( cell );
+            }
+        }
+        #endregion
+
+		#region Properties - abstract
+        public abstract int Count
+        {
+            get;
+        }
+
+		public abstract HeapCell this[ int aIndex ]
+		{
+            get;
+		}
+		#endregion
+
+        #region As CSV & Text
+        public override string ToString()
+        {
+            StringBuilder ret = new StringBuilder();
+
+            // Create entries
+            int index = 0;
+            foreach( HeapCell cell in this )
+            {
+                // INDEX
+                ret.Append( "[" + index.ToString("d6") + "]  " );
+
+                // TYPE
+                ret.Append( cell.TypeString );
+                if	( cell.Type == HeapCell.TType.EFree )
+                {
+                    ret.Append( "     " ); // to make the same length as "Allocated" we need 5 extra spaces
+                }
+                ret.Append( "  " );
+
+                // ADDRESS
+                ret.Append( "@ 0x" + cell.Address.ToString("x8") );
+                ret.Append( "  " );
+
+                // LENGTH
+                ret.Append( "Len: " + cell.Length.ToString( "########" ) );
+                ret.Append( ", " );
+
+                // PAYLOAD LENGTH
+                ret.Append( "PayL: " + cell.PayloadLength.ToString( "########" ) );
+                ret.Append( ", " );
+
+                // NESTING LEVEL
+                ret.Append( "Nest: " + cell.NestingLevel.ToString( "########" ) );
+                ret.Append( ", " );
+
+                // ALLOCATION NUMBER
+                ret.Append( "Allo#: " + cell.AllocationNumber.ToString( "########" ) );
+                ret.Append( ", " );
+
+                // VTABLE ADDRESS
+                ret.Append( "VT: 0x" + cell.PossibleVTableAddress.ToString("x8") );
+                ret.Append( ", " );
+
+                // VTABLE SYMBOL
+                ret.Append( "{ " + cell.SymbolString + " }" );
+                ret.Append( System.Environment.NewLine );
+
+                ++index;
+            }
+            //
+            return ret.ToString();
+        }
+
+        public string ToCSV()
+        {
+            StringBuilder ret = new StringBuilder();
+			
+            // Create header
+            ret.Append( "Index,Type,Address,Length,Payload Length,Payload Length (inc  linked cells),Recursive (linked) Payload Length,Nesting Level,Allocation Number,VTable Address,VTable Symbol" );
+            ret.Append( System.Environment.NewLine );
+
+            // Create entries
+            int index = 0;
+            foreach( HeapCell cell in this )
+            {
+                // INDEX
+                ret.Append( index.ToString("d6") );
+                ret.Append( "," );
+
+                // TYPE
+                ret.Append( cell.TypeString );
+                ret.Append( "," );
+
+                // ADDRESS
+                ret.Append( "0x" + cell.Address.ToString("x8") );
+                ret.Append( "," );
+
+                // LENGTH
+                ret.Append( cell.Length );
+                ret.Append( "," );
+
+                // PAYLOAD LENGTH
+                ret.Append( cell.PayloadLength );
+                ret.Append( "," );
+
+                // PAYLOAD LENGTH INCLUDING LINKED CELLS
+                ret.Append( cell.PayloadLengthIncludingLinkedCells );
+                ret.Append( "," );
+
+                // RECURSIVE LINKED PAYLOAD LENGTH
+                ret.Append( cell.CombinedLinkedCellPayloadLengths );
+                ret.Append( "," );
+
+                // NESTING LEVEL
+                ret.Append( cell.NestingLevel );
+                ret.Append( "," );
+
+                // ALLOCATION NUMBER
+                ret.Append( cell.AllocationNumber );
+                ret.Append( "," );
+
+                // VTABLE ADDRESS
+                ret.Append( "0x" + cell.PossibleVTableAddress.ToString("x8") );
+                ret.Append( "," );
+
+                // VTABLE SYMBOL
+                ret.Append( cell.SymbolString );
+
+                ret.Append( System.Environment.NewLine );
+
+                ++index;
+            }
+            //
+            return ret.ToString();
+        }
+        #endregion
+
+		#region IEnumerable Members
+        IEnumerator IEnumerable.GetEnumerator()
+		{
+			return new HeapCellArrayEnumerator( this );
+		}
+
+        IEnumerator<HeapCell> IEnumerable<HeapCell>.GetEnumerator()
+        {
+            return CreateEnumerator();
+        }
+        #endregion
+
+		#region Data members
+        private HeapCellArrayAllocationNumberMap iAllocMap = null;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayEnumerator.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+
+namespace HeapLib.Array
+{
+    internal class HeapCellArrayEnumerator : IEnumerator<HeapCell>
+    {
+        #region Constructors & destructor
+        public HeapCellArrayEnumerator( HeapCellArrayBase aArray )
+        {
+            iArray = aArray;
+        }
+        #endregion
+
+        #region IEnumerator Members
+        void IEnumerator.Reset()
+        {
+            iCurrentIndex = -1;
+        }
+
+        object IEnumerator.Current
+        {
+            get
+            {
+                return iArray[ iCurrentIndex ];
+            }
+        }
+
+        bool IEnumerator.MoveNext()
+        {
+            return ( ++iCurrentIndex < iArray.Count );
+        }
+        #endregion
+
+        #region From IEnumerator<HeapCell>
+        HeapCell IEnumerator<HeapCell>.Current
+        {
+            get { return iArray[ iCurrentIndex ]; }
+        }
+        #endregion
+
+        #region From IDisposable
+        public void Dispose()
+        {
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCellArrayBase iArray;
+        private int iCurrentIndex = -1;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayUnsorted.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,116 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+
+namespace HeapLib.Array
+{
+	public class HeapCellArrayUnsorted : HeapCellArrayBase
+	{
+		#region Constructors & destructor
+		public HeapCellArrayUnsorted()
+            : this( 100 )
+		{
+		}
+
+        public HeapCellArrayUnsorted( HeapCellArrayBase aCopyFrom )
+            : this( aCopyFrom.Count )
+        {
+            foreach ( HeapCell cell in aCopyFrom )
+            {
+                Add( cell );
+            }
+        }
+
+        public HeapCellArrayUnsorted( int aGranularity )
+		{
+            iItems = new List< HeapCell >( aGranularity );
+		}
+		#endregion
+
+		#region API
+        public override void Clear()
+        {
+            iItems.Clear();
+        }
+
+        public override void Add( HeapCell aCell )
+        {
+            iItems.Add( aCell );
+        }
+
+        public override void Remove( HeapCell aCell )
+        {
+            int index = CellIndex( aCell );
+            if ( index >= 0 )
+            {
+                iItems.RemoveAt( index );
+            }
+        }
+
+        public override int CellIndex( HeapCell aCell )
+		{
+            int index = iItems.IndexOf( aCell );
+			return index;
+		}
+        #endregion
+
+		#region Properties
+		public override int Count
+		{
+			get { return iItems.Count; }
+		}
+
+        public override HeapCell this[ int aIndex ]
+		{
+            get
+            {
+                HeapCell ret = iItems[ aIndex ];
+                return ret;
+            }
+		}
+		#endregion
+
+		#region Data members
+        private List< HeapCell > iItems = new List< HeapCell >();
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Array/HeapCellArrayWithStatistics.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using HeapLib.Cells;
+using HeapLib.Statistics;
+
+namespace HeapLib.Array
+{
+	public class HeapCellArrayWithStatistics : HeapCellArray
+	{
+		#region Constructors & destructor
+		public HeapCellArrayWithStatistics()
+		{
+		}
+
+		public HeapCellArrayWithStatistics( int aGranularity )
+            : base( aGranularity )
+		{
+		}
+
+		public HeapCellArrayWithStatistics( HeapCellArray aCopy )
+            : base( aCopy )
+		{
+		}
+		#endregion
+
+		#region From HeapCellArray
+        public override void Add( HeapCell aCell )
+        {
+            base.Add( aCell );
+            iStatistics.HandleCell( aCell );
+        }
+        #endregion
+
+        #region Properties
+        public HeapStatistics Statistics
+        {
+            get { return iStatistics; }
+        }
+        #endregion
+
+        #region Data members
+        private HeapStatistics iStatistics = new HeapStatistics();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("HeapLib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Nokia")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/DescriptorAlgorithmBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SymbianUtils.RawItems;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors
+{
+    public abstract class DescriptorAlgorithmBase
+    {
+        #region Constructors & destructor
+        protected DescriptorAlgorithmBase( HeapStatistics aStats )
+        {
+            iStats = aStats;
+        }
+        #endregion
+
+        #region Framework API
+        internal virtual bool IsDescriptor( HeapCell aCell, out DescriptorInfo aInfo )
+        {
+            aInfo = null;
+            iCell = aCell;
+            //
+            bool couldBeDescriptor = ( aCell.Symbol == null && RawItems.Count > 1 );
+            if ( couldBeDescriptor )
+            {
+                int payloadLength = PayloadLengthWhenCellIsDescriptor;
+                int possibleDescriptorLength = CalculatedDescriptorLength;
+                //
+                couldBeDescriptor = ( possibleDescriptorLength <= payloadLength );
+                //
+                if ( couldBeDescriptor )
+                {
+                    // Need to make a descriptor info object just to get the type...
+                    DescriptorInfo info = new DescriptorInfo( aCell );
+                    couldBeDescriptor = ( info.Type != HeapCell.TDescriptorType.EUnknown );
+                }
+            }
+            //
+            return couldBeDescriptor;
+        }
+        #endregion
+
+        #region Properties
+        protected HeapCell Cell
+        {
+            get { return iCell; }
+        }
+
+        protected RawItemCollection RawItems
+        {
+            get { return Cell.RawItems; }
+        }
+
+        protected HeapStatistics Statistics
+        {
+            get { return iStats; }
+        }
+
+        protected int PayloadLengthWhenCellIsDescriptor
+        {
+            get
+            {
+                // Layout is:
+                //
+                // First DWORD:
+                //
+                //   < 4 bits> Type
+                //   <28 bits> Length
+                //
+                // Second DWORD:
+                //
+                //   Max Length
+                //
+                // Reduce the size by 4 since we discard the descriptor length
+                int payloadLength = (int) Cell.PayloadLength - 4;
+                return payloadLength;
+            }
+        }
+
+        protected int CalculatedDescriptorLength
+        {
+            get
+            {
+                uint vTable = Cell.PossibleVTableAddress;
+                uint len = vTable & KDescriptorLengthMask;
+                return (int) len;
+            }
+        }
+
+        protected int CalculatedDescriptorMaxLength
+        {
+            get
+            {
+                System.Diagnostics.Debug.Assert( RawItems.Count >= 2 );
+                RawItem maxLenRI = Cell.RawItems[ 1 ];
+                int maxLength = (int) maxLenRI.Data;
+                return maxLength;
+            }
+        }
+        #endregion
+
+        #region Shared constants
+        protected const int KDescriptorRawItemOffsetAfterLengthAndType = 1;
+        protected const int KDescriptorTextMaxLength = 256;
+        protected const byte KDescriptorPaddingMagicCharacterValue = 0xa5;
+        protected const uint KDescriptorLengthMask = 0x00FFFFFF;
+        #endregion
+
+        #region Data members
+        private readonly HeapStatistics iStats;
+        private HeapCell iCell = new HeapCell();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/DescriptorAlgorithmManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Statistics;
+using HeapLib.Cells.Descriptors.Implementations.Unicode;
+using HeapLib.Cells.Descriptors.Implementations.Ascii;
+
+namespace HeapLib.Cells.Descriptors
+{
+    internal class DescriptorAlgorithmManager
+    {
+        #region API
+        public static DescriptorInfo DescriptorInfo( HeapCell aCell, HeapStatistics aStats )
+        {
+            DescriptorInfo ret = null;
+            //
+            if ( iAlgorithms.Count == 0 )
+            {
+                PrepareAlgorithms( aStats );
+            }
+            //
+            foreach ( DescriptorAlgorithmBase alg in iAlgorithms )
+            {
+                bool isDes = alg.IsDescriptor( aCell, out ret );
+                if ( isDes && ret != null )
+                {
+                    // We won't allow any algorithm to "recognise" the heap cell as a descriptor
+                    // unless it can say that the length is > 0.
+                    int length = ret.Length;
+                    if ( length > 0 )
+                    {
+                        break;
+                    }
+                    else
+                    {
+                        ret = null;
+                    }
+                }
+            }
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        private static void PrepareAlgorithms( HeapStatistics aStats )
+        {
+            // UNICODE
+            iAlgorithms.Add( new DesUnicodeAlgorithmHBufC( aStats ) );
+            iAlgorithms.Add( new DesUnicodeAlgorithmModifiableBuffers( aStats ) );
+
+            // ASCII
+            iAlgorithms.Add( new DesAsciiAlgorithmHBufC( aStats ) );
+            iAlgorithms.Add( new DesAsciiAlgorithmModifiableBuffers( aStats ) );
+
+            // C-STRING
+            iAlgorithms.Add( new DesAsciiAlgorithmNullTerminatedString( aStats ) );
+        }
+        #endregion
+
+        #region Data members
+        private static List<DescriptorAlgorithmBase> iAlgorithms = new List<DescriptorAlgorithmBase>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/DescriptorInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Cells.Descriptors
+{
+    public class DescriptorInfo
+    {
+        #region Constructors & destructor
+        internal DescriptorInfo( HeapCell aCell )
+            : this( aCell, false )
+        {
+        }
+
+        internal DescriptorInfo( HeapCell aCell, bool aIsUnicode )
+        {
+            iCell = aCell;
+            iType = DescriptorType( aCell );
+            iIsUnicode = aIsUnicode;
+        }
+        #endregion
+
+        #region API
+        public static HeapCell.TDescriptorType DescriptorType( HeapCell aCell )
+        {
+            HeapCell.TDescriptorType ret = HeapCell.TDescriptorType.EUnknown;
+            //
+            int type = (int) ( aCell.PossibleVTableAddress >> KDescriptorTypeShiftCount );
+            if ( type >= (int) HeapCell.TDescriptorType.EBufC && type < (int) HeapCell.TDescriptorType.EUnknown )
+            {
+                ret = (HeapCell.TDescriptorType) type;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public bool IsUnicode
+        {
+            get { return iIsUnicode; }
+            set { iIsUnicode = value; }
+        }
+
+        public string Text
+        {
+            get { return iText; }
+            set { iText = value; }
+        }
+
+        public int Length
+        {
+            get { return iText.Length; }
+        }
+
+        public HeapCell.TDescriptorType Type
+        {
+            get { return iType; }
+            set
+            {
+                iType = value;
+            }
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KDescriptorTypeShiftCount = 28;
+        #endregion
+
+        #region Data members
+        private readonly HeapCell iCell;
+        private bool iIsUnicode = false;
+        private HeapCell.TDescriptorType iType = HeapCell.TDescriptorType.EUnknown;
+        private string iText = string.Empty;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SymbianUtils.RawItems;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors.Implementations.Ascii
+{
+    internal class DesAsciiAlgorithmBase : DescriptorAlgorithmBase
+    {
+        #region Constructors & destructor
+        public DesAsciiAlgorithmBase( HeapStatistics aStats )
+            : base( aStats )
+        {
+        }
+        #endregion
+
+        #region Internal constants
+        protected const int KDescriptorRawItemOffsetEBufC = KDescriptorRawItemOffsetAfterLengthAndType + 1; // Allows for [Type+Length] + MaxLength
+        #endregion
+
+        #region Internal methods
+        protected string ConvertToText( int aLengthInUnicodeChars )
+        {
+            return ConvertToText( aLengthInUnicodeChars, KDescriptorRawItemOffsetAfterLengthAndType );
+        }
+
+        protected string ConvertToText( int aLengthInAsciiChars, int aStartRawItemIndex )
+        {
+            StringBuilder text = new StringBuilder();
+            for ( int i = aStartRawItemIndex; i < RawItems.Count && i < Math.Min( aLengthInAsciiChars, DescriptorAlgorithmBase.KDescriptorTextMaxLength ); i++ )
+            {
+                RawItem item = RawItems[ i ];
+                //
+                text.Append( item.OriginalCharacterisedData );
+            }
+            //
+            string ret = text.ToString();
+            if ( ret.Length > aLengthInAsciiChars )
+            {
+                ret = ret.Substring( 0, aLengthInAsciiChars );
+            }
+            return ret;
+        }
+
+        protected int PrintableCharacterCount( int aMaxNumberOfAsciiBytesToProcess, out bool aAllBytesWereAsciiCharacters )
+        {
+            return PrintableCharacterCount( aMaxNumberOfAsciiBytesToProcess, KDescriptorRawItemOffsetAfterLengthAndType, out aAllBytesWereAsciiCharacters );
+        }
+
+        protected int PrintableCharacterCount( int aMaxNumberOfAsciiBytesToProcess, int aStartRawItemIndex, out bool aAllBytesWereAsciiCharacters )
+        {
+            int printableCharCount = 0;
+            int bytesRemaining = aMaxNumberOfAsciiBytesToProcess;
+
+            for ( int i = aStartRawItemIndex; i < RawItems.Count && bytesRemaining > 0; i++ )
+            {
+                RawItem item = RawItems[ i ];
+                byte[] data = item.DataArray;
+                //
+                for ( int j = 0; j < data.Length && bytesRemaining > 0; j++ )
+                {
+                    byte b = data[ j ];
+                    bool byteIsPrint = IsPrintableAsciiCharacter( b );
+                    if ( byteIsPrint )
+                    {
+                        ++printableCharCount;
+                    }
+                    --bytesRemaining;
+                }
+            }
+            //
+            aAllBytesWereAsciiCharacters = ( aMaxNumberOfAsciiBytesToProcess == printableCharCount );
+            return printableCharCount;
+        }
+
+        protected static bool IsPrintableAsciiCharacter( byte aByte )
+        {
+            bool ret = false;
+            //
+            if ( aByte >= 32 /*SPACE*/ && aByte < 127 /*DEL*/ || aByte == 0x0D /*CR*/ || aByte == 0x0A /*LF*/ || aByte == 0x09 /*TAB*/ )
+            {
+                ret = true;
+            }
+            //
+            return ret;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmHBufC.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors.Implementations.Ascii
+{
+    internal class DesAsciiAlgorithmHBufC : DesAsciiAlgorithmBase
+    {
+        #region Constructors & destructor
+        public DesAsciiAlgorithmHBufC( HeapStatistics aStats )
+            : base( aStats )
+        {
+        }
+        #endregion
+
+        #region From DescriptorAlgorithmBase
+        internal override bool IsDescriptor( HeapCell aCell, out DescriptorInfo aInfo )
+        {
+            // Base-class makes first pass.
+            bool isDes = base.IsDescriptor( aCell, out aInfo );
+            //
+            if ( isDes )
+            {
+                // Now we can check if it meet our requirements...
+                int length = base.CalculatedDescriptorLength;
+                bool allWerePrintableCharacers = false;
+                int printCharCount = PrintableCharacterCount( length, out allWerePrintableCharacers );
+                //
+                if ( printCharCount == length )
+                {
+                    aInfo = new DescriptorInfo( aCell );
+                    aInfo.Text = ConvertToText( length );
+                    isDes = true;
+                }
+            }
+            //
+            return isDes;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmModifiableBuffers.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors.Implementations.Ascii
+{
+    internal class DesAsciiAlgorithmModifiableBuffers : DesAsciiAlgorithmBase
+    {
+        #region Constructors & destructor
+        public DesAsciiAlgorithmModifiableBuffers( HeapStatistics aStats )
+            : base( aStats )
+        {
+        }
+        #endregion
+
+        #region From DescriptorAlgorithmBase
+        internal override bool IsDescriptor( HeapCell aCell, out DescriptorInfo aInfo )
+        {
+            // Base-class makes first pass.
+            bool isDes = base.IsDescriptor( aCell, out aInfo );
+            //
+            if ( isDes )
+            {
+                DescriptorInfo info = new DescriptorInfo( aCell );
+                HeapCell.TDescriptorType type = info.Type;
+
+                // There needs to be at least two raw items, one for the descriptor type & length, and 
+                // another for the max length.
+                if ( type != HeapCell.TDescriptorType.EUnknown && RawItems.Count > 2 && type == HeapCell.TDescriptorType.EBuf )
+                {
+                    // Now we can check if it meet our requirements...
+                    int length = base.CalculatedDescriptorLength;
+                    int maxLength = base.CalculatedDescriptorMaxLength;
+                    //
+                    bool allWerePrintableCharacers = false;
+                    int printCharCount = PrintableCharacterCount( length, DesAsciiAlgorithmBase.KDescriptorRawItemOffsetEBufC, out allWerePrintableCharacers );
+                    //
+                    if ( printCharCount == length && length <= maxLength )
+                    {
+                        aInfo = info;
+                        aInfo.Text = ConvertToText( length, DesAsciiAlgorithmBase.KDescriptorRawItemOffsetEBufC );
+                        isDes = true;
+                    }
+                }
+                else if ( type == HeapCell.TDescriptorType.EBufCPtr )
+                {
+                    int x = 0;
+                    x++;
+                }
+            }
+            //
+            return isDes;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Ascii/DesAsciiAlgorithmNullTerminatedString.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SymbianUtils.RawItems;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors.Implementations.Ascii
+{
+    internal class DesAsciiAlgorithmNullTerminatedString : DesAsciiAlgorithmBase
+    {
+        #region Constructors & destructor
+        public DesAsciiAlgorithmNullTerminatedString( HeapStatistics aStats )
+            : base( aStats )
+        {
+        }
+        #endregion
+
+        #region From DescriptorAlgorithmBase
+        internal override bool IsDescriptor( HeapCell aCell, out DescriptorInfo aInfo )
+        {
+            // Use this to initialise 'Cell'
+            base.IsDescriptor( aCell, out aInfo );
+
+            bool isDes = ( aCell.Symbol == null && RawItems.Count > 1 );
+            if ( isDes )
+            {
+                isDes = false;
+                int checkedCharCount = 0;
+                int printableCharCount = 0;
+                int letterOrDigitCount = 0;
+                int numberOfHeapAddresses = 0;
+                
+                // Keep reading chars until we hit a NULL
+                bool foundNull = false;
+                foreach ( RawItem item in RawItems )
+                {
+                    if ( Statistics.WithinHeapBounds( item.Data ) )
+                    {
+                        ++numberOfHeapAddresses;
+                    }
+
+                    byte[] data = item.DataArray;
+                    foreach ( byte b in data )
+                    {
+                        if ( b != 0 )
+                        {
+                            ++checkedCharCount;
+
+                            char c = Convert.ToChar( b );
+                            if ( Char.IsLetterOrDigit( c ) )
+                            {
+                                ++letterOrDigitCount;
+                            }
+
+                            bool isPrint = IsPrintableAsciiCharacter( b );
+                            if ( isPrint )
+                            {
+                                ++printableCharCount;
+                            }
+                            else
+                            {
+                                break;
+                            }
+                        }
+                        else
+                        {
+                            foundNull = true;
+                            break;
+                        }
+                    }
+
+                    if ( foundNull )
+                    {
+                        break;
+                    }
+                }
+
+                // All chars must be printable
+                bool allWerePrintable = ( checkedCharCount == printableCharCount && printableCharCount > 0 );
+                if ( foundNull && allWerePrintable && numberOfHeapAddresses == 0 && letterOrDigitCount > 0 )
+                {
+                    // If the size of the cell is very big and the "string" itself is very small, then chances
+                    // are this is not a null terminated string at all. 
+                    int percentageOfStringUsed = AsPercentage( aCell, printableCharCount );
+                    if ( percentageOfStringUsed > KMinimumUtilisationPercentage )
+                    {
+                        aInfo = new DescriptorInfo( aCell );
+                        aInfo.Text = ConvertToText( printableCharCount, 0 );
+                        aInfo.Type = HeapCell.TDescriptorType.ENullTerminatedString;
+                        isDes = true;
+                    }
+                }
+            }
+            //
+            return isDes;
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KMinimumUtilisationPercentage = 10; // Percent
+        #endregion
+
+        #region Internal methods
+        private static int AsPercentage( HeapCell aCell, int aLength )
+        {
+            uint totalLength = aCell.PayloadLength;
+            float ret = ( (float) aLength / (float) totalLength ) * 100.0f;
+            return (int) ret;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Unicode/DesUnicodeAlgorithmBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SymbianUtils.RawItems;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors.Implementations.Unicode
+{
+    internal class DesUnicodeAlgorithmBase : DescriptorAlgorithmBase
+    {
+        #region Constructors & destructor
+        public DesUnicodeAlgorithmBase( HeapStatistics aStats )
+            : base( aStats )
+        {
+        }
+        #endregion
+
+        #region Internal constants
+        protected const int KDescriptorRawItemOffsetEBufC = KDescriptorRawItemOffsetAfterLengthAndType + 1; // Allows for [Type+Length] + MaxLength
+        #endregion
+
+        #region Internal methods
+        protected string ConvertToText( int aLengthInUnicodeChars )
+        {
+            return ConvertToText( aLengthInUnicodeChars, KDescriptorRawItemOffsetAfterLengthAndType );
+        }
+
+        protected string ConvertToText( int aLengthInUnicodeChars, int aStartRawItemIndex )
+        {
+            StringBuilder text = new StringBuilder();
+            for ( int i = aStartRawItemIndex; i < RawItems.Count && i < Math.Min( aLengthInUnicodeChars, DescriptorAlgorithmBase.KDescriptorTextMaxLength ); i++ )
+            {
+                RawItem item = RawItems[ i ];
+                //
+                text.Append( item.OriginalCharacterisedDataAsUnicode );
+            }
+            //
+            string ret = text.ToString();
+            if ( ret.Length > aLengthInUnicodeChars )
+            {
+                ret = ret.Substring( 0, aLengthInUnicodeChars );
+            }
+            return ret;
+        }
+
+        protected int PrintableCharacterCount( int aMaxNumberOfUnicodeWordsToProcess, out bool aAllWordsWereAsciiCharacters )
+        {
+            return PrintableCharacterCount( aMaxNumberOfUnicodeWordsToProcess, KDescriptorRawItemOffsetAfterLengthAndType, out aAllWordsWereAsciiCharacters );
+        }
+
+        protected int PrintableCharacterCount( int aMaxNumberOfUnicodeWordsToProcess, int aStartRawItemIndex, out bool aAllWordsWereAsciiCharacters )
+        {
+            int printableCharCount = 0;
+            int wordsRemaining = aMaxNumberOfUnicodeWordsToProcess;
+            
+            for ( int i = aStartRawItemIndex; i < RawItems.Count && wordsRemaining > 0; i++ )
+            {
+                RawItem item = RawItems[ i ];
+                ushort[] data = item.DataArrayWords;
+                //
+                bool word1IsPrint = IsPrintableAsciiCharacter( data[ 0 ] );
+                if ( word1IsPrint )
+                {
+                    ++printableCharCount;
+                }
+                --wordsRemaining;
+                //
+                if ( wordsRemaining > 0 )
+                {
+                    bool word2IsPrint = IsPrintableAsciiCharacter( data[ 1 ] );
+                    if ( word2IsPrint )
+                    {
+                        ++printableCharCount;
+                    }
+                    --wordsRemaining;
+                }
+            }
+            //
+            aAllWordsWereAsciiCharacters = ( aMaxNumberOfUnicodeWordsToProcess == printableCharCount );
+            return printableCharCount;
+        }
+
+        protected static bool IsPrintableAsciiCharacter( ushort aWord )
+        {
+            bool ret = false;
+            //
+            if ( aWord >= 32 /*SPACE*/ && aWord < 127 /*DEL*/ || aWord == 0x0D /*CR*/ || aWord == 0x0A /*LF*/ || aWord == 0x09 /*TAB*/ )
+            {
+                ret = true;
+            }
+            //
+            return ret;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Unicode/DesUnicodeAlgorithmHBufC.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors.Implementations.Unicode
+{
+    internal class DesUnicodeAlgorithmHBufC : DesUnicodeAlgorithmBase
+    {
+        #region Constructors & destructor
+        public DesUnicodeAlgorithmHBufC( HeapStatistics aStats )
+            : base( aStats )
+        {
+        }
+        #endregion
+
+        #region From DescriptorAlgorithmBase
+        internal override bool IsDescriptor( HeapCell aCell, out DescriptorInfo aInfo )
+        {
+            // Base-class makes first pass.
+            bool isDes = base.IsDescriptor( aCell, out aInfo );
+            //
+            if ( isDes )
+            {
+                // Now we can check if it meet our requirements...
+                int length = base.CalculatedDescriptorLength;
+                bool allWerePrintableCharacers = false;
+                int printCharCount = PrintableCharacterCount( length, out allWerePrintableCharacers );
+                //
+                if ( printCharCount == length )
+                {
+                    aInfo = new DescriptorInfo( aCell, true );
+                    aInfo.Text = ConvertToText( length );
+                    isDes = true;
+                }
+            }
+            //
+            return isDes;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/Descriptors/Implementations/Unicode/DesUnicodeAlgorithmModifiableBuffers.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Statistics;
+
+namespace HeapLib.Cells.Descriptors.Implementations.Unicode
+{
+    internal class DesUnicodeAlgorithmModifiableBuffers : DesUnicodeAlgorithmBase
+    {
+        #region Constructors & destructor
+        public DesUnicodeAlgorithmModifiableBuffers( HeapStatistics aStats )
+            : base( aStats )
+        {
+        }
+        #endregion
+
+        #region From DescriptorAlgorithmBase
+        internal override bool IsDescriptor( HeapCell aCell, out DescriptorInfo aInfo )
+        {
+            // Base-class makes first pass.
+            bool isDes = base.IsDescriptor( aCell, out aInfo );
+            //
+            if ( isDes )
+            {
+                DescriptorInfo info = new DescriptorInfo( aCell, true );
+                HeapCell.TDescriptorType type = info.Type;
+
+                // There needs to be at least two raw items, one for the descriptor type & length, and 
+                // another for the max length.
+                if ( type != HeapCell.TDescriptorType.EUnknown && RawItems.Count > 2 && type == HeapCell.TDescriptorType.EBuf )
+                {
+                    // Now we can check if it meet our requirements...
+                    int length = base.CalculatedDescriptorLength;
+                    int maxLength = base.CalculatedDescriptorMaxLength;
+                    //
+                    bool allWerePrintableCharacers = false;
+                    int printCharCount = PrintableCharacterCount( length, DesUnicodeAlgorithmBase.KDescriptorRawItemOffsetEBufC, out allWerePrintableCharacers );
+                    //
+                    if ( printCharCount == length && length <= maxLength )
+                    {
+                        aInfo = info;
+                        aInfo.Text = ConvertToText( length, DesUnicodeAlgorithmBase.KDescriptorRawItemOffsetEBufC );
+                        isDes = true;
+                    }
+                }
+                else if ( type == HeapCell.TDescriptorType.EBufCPtr )
+                {
+                    int x = 0;
+                    x++;
+                }
+            }
+            //
+            return isDes;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/HeapCell.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,940 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using SymbianStructuresLib.Debug.Symbols;
+using SymbianUtils.RawItems;
+using SymbianUtils.Utilities;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Cells.Descriptors;
+
+namespace HeapLib.Cells
+{
+    public class HeapCell : IEnumerable<RawItem>, IEquatable<HeapCell>
+    {
+        #region Enumerations
+        public enum TRegion
+        {
+            EHeader = 0,
+            EPayload,
+            EBeforeCell,
+            EAfterCell
+        }
+
+        public enum TType : byte
+        {
+            EAllocated = 0,
+            EFree
+        }
+
+        public enum TBuildType
+        {
+            ERelease = 0,
+            EDebug = 1
+        }
+
+        public enum TDescriptorType
+        {
+            // These are Symbian's descriptor types
+            EBufC = 0,
+            EPtrC,
+            EPtr,
+            EBuf,
+            EBufCPtr,
+
+            // This are specific to this app
+            ENullTerminatedString,
+            EUnknown,
+        }
+        #endregion
+
+        #region Constructors & destructor
+        public HeapCell()
+        {
+            iRelationshipManager = new RelationshipManager(this);
+        }
+
+        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);
+        }
+
+        internal HeapCell(uint aAddress, uint aLength, TType aType)
+            : this()
+        {
+            iAddress = aAddress;
+            iType = aType;
+            //
+            iHeaderRawItems.Clear();
+            AddRawItemHeader(new RawItem(aAddress, aLength));
+        }
+        #endregion
+
+        #region Constants
+        public const uint KHeapCellSizeAllocatedUREL = 4;   // Just length
+        public const uint KHeapCellSizeAllocatedUDEB = 12;  // Length + Allocation Number + Nesting Level
+        public const uint KHeapCellSizeFree = 8;            // Length + Pointer to next free cell
+        #endregion
+
+        #region API
+        public void AddRawItem(RawItem aItem)
+        {
+            RawItems.Add(aItem);
+            //
+            byte[] dataArray = aItem.DataArray;
+            iChecksum.Checksum(dataArray);
+        }
+
+        public void AddRawItemHeader(RawItem aItem)
+        {
+            // Not checksummed
+            iHeaderRawItems.Add(aItem);
+            if (iHeaderRawItems.Count == 1)
+            {
+                iLength = iHeaderRawItems[0].Data;
+            }
+        }
+
+        public uint Remainder(uint aAddress)
+        {
+            uint ret = (Address + Length) - aAddress;
+            return ret;
+        }
+
+        public static uint CellHeaderSize(TType aType)
+        {
+            uint ret = AllocatedCellHeaderSize;
+            if (aType == TType.EFree)
+            {
+                ret = FreeCellHeaderSize;
+            }
+            return ret;
+        }
+
+        public static uint AllocatedCellSizeByBuildType(TBuildType aType)
+        {
+            uint size = 0;
+            //
+            switch (aType)
+            {
+                case TBuildType.EDebug:
+                    size = KHeapCellSizeAllocatedUDEB;
+                    break;
+                case TBuildType.ERelease:
+                    size = KHeapCellSizeAllocatedUREL;
+                    break;
+            }
+            //
+            return size;
+        }
+
+        public TRegion RegionForAddress(uint aAddress)
+        {
+            uint address = Address;
+            //
+            TRegion ret = TRegion.EBeforeCell;
+            //
+            if (aAddress < address)
+            {
+                ret = TRegion.EBeforeCell;
+            }
+            else
+            {
+                uint endAddress = EndAddress;
+                //
+                if (aAddress > endAddress)
+                {
+                    ret = TRegion.EAfterCell;
+                }
+                else
+                {
+                    uint startOfPayload = StartOfPayloadAddress;
+                    //
+                    if (aAddress >= startOfPayload)
+                    {
+                        ret = TRegion.EPayload;
+                    }
+                    else
+                    {
+                        ret = TRegion.EHeader;
+                    }
+                }
+            }
+            //
+            return ret;
+        }
+
+        public TRegion RegionForAddress(uint aAddress, out int aRemainingUntilNextBoundary)
+        {
+            TRegion region = RegionForAddress(aAddress);
+            //
+            switch (region)
+            {
+                default:
+                    aRemainingUntilNextBoundary = -1;
+                    break;
+                case TRegion.EHeader:
+                case TRegion.EPayload:
+                    if (region == TRegion.EHeader)
+                    {
+                        uint startOfPayload = StartOfPayloadAddress;
+                        aRemainingUntilNextBoundary = (int)(startOfPayload - aAddress);
+                    }
+                    else
+                    {
+                        uint endAddress = EndAddress;
+                        aRemainingUntilNextBoundary = (int)(endAddress - aAddress + 1);
+                    }
+                    break;
+            }
+            //
+            return region;
+        }
+
+        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 void ConstructionComplete(Statistics.HeapStatistics aStats)
+        {
+            if (Type == TType.EAllocated)
+            {
+                iDescriptorInfo = Descriptors.DescriptorAlgorithmManager.DescriptorInfo(this, aStats);
+            }
+        }
+        #endregion
+
+        #region Properties
+        public HeapCell.TType Type
+        {
+            get { return iType; }
+            set { iType = value; }
+        }
+
+        public string TypeString
+        {
+            get
+            {
+                string ret = string.Empty;
+                //
+                switch (Type)
+                {
+                    case TType.EAllocated:
+                        ret = "Allocated";
+                        break;
+                    case TType.EFree:
+                        ret = "Free";
+                        break;
+                }
+                //
+                return ret;
+            }
+        }
+
+        // <summary>
+        // The index is the unique number assigned to each cell as it is
+        // added to the heap data for a given heap. This operation is 
+        // performed by the reconstructor during parsing.
+        // </summary>
+        public uint Index
+        {
+            get { return iIndex; }
+            set { iIndex = value; }
+        }
+
+        public uint Address
+        {
+            get { return iAddress; }
+            set { iAddress = value; }
+        }
+
+        public uint StartOfPayloadAddress
+        {
+            get
+            {
+                uint ret = Address;
+                //
+                if (Type == TType.EAllocated)
+                {
+                    ret += HeaderSize;
+                }
+                else if (Type == TType.EFree)
+                {
+                    ret += KHeapCellSizeFree;
+                }
+                else
+                {
+                    System.Diagnostics.Debug.Assert(false);
+                }
+                //
+                return ret;
+            }
+        }
+
+        public uint EndAddress
+        {
+            get { return iAddress + iLength - 1; }
+        }
+
+        public uint Length
+        {
+            // Optimisation: we cache the length when adding the first
+            // header raw item to avoid having to repeatedly access
+            // the raw items array during initial heap preparation.
+            get { return iLength; }
+        }
+
+        public uint NestingLevel
+        {
+            get
+            {
+                // Only applicable to allocated cells in debug builds
+                uint ret = 0;
+                //
+                if (Type == TType.EAllocated && IsDebugAllocator)
+                {
+                    System.Diagnostics.Debug.Assert(HeaderRawItems.Count >= 2);
+                    RawItem item = HeaderRawItems[1]; // Always 2nd raw item in header
+                    ret = item.Data;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public uint AllocationNumber
+        {
+            get
+            {
+                // Only applicable to allocated cells in debug builds
+                uint ret = 0;
+                //
+                if (Type == TType.EAllocated && IsDebugAllocator)
+                {
+                    System.Diagnostics.Debug.Assert(HeaderRawItems.Count >= 3);
+                    RawItem item = HeaderRawItems[2]; // Always 3rd raw item in header
+                    ret = item.Data;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public uint PossibleVTableAddress
+        {
+            get
+            {
+                // This is always the first raw item
+                uint ret = 0;
+                //
+                if (RawItems.Count > 0)
+                {
+                    ret = RawItems[0].Data;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public Symbol Symbol
+        {
+            get { return iSymbol[0]; }
+            set { iSymbol[0] = value; }
+        }
+
+        public Symbol Symbol2
+        {
+            get { return iSymbol[1]; }
+            set { iSymbol[1] = value; }
+        }
+
+        public Symbol Symbol3
+        {
+            get { return iSymbol[2]; }
+            set { iSymbol[2] = value; }
+        }
+
+        public string SymbolString
+        {
+            get
+            {
+                return SymbolStringRef(false);
+            }
+        }
+
+        private string SymbolStringRef(bool reference)
+        {
+            StringBuilder ret = new StringBuilder();
+
+            if (Type == TType.EAllocated)
+            {
+                if (Symbol != null)
+                {
+                    ret.Append(Symbol.NameWithoutVTablePrefix);
+                }
+                else if (IsDescriptor)
+                {
+                    ret.Append("[Descriptor] " + DescriptorTextBeautified);
+                }
+            }
+            else if (Type == TType.EFree)
+            {
+                ret.Append("[Free]");
+                if (Symbol != null)
+                {
+                    ret.Append(" ");
+                    ret.Append(Symbol.NameWithoutVTablePrefix);
+                }
+            }
+
+            // If no text as yet identified, then return [Unknown], if there is not unique referrer.
+            // If the referrer is unique, or if all referrers are of the same known type,
+            // instead of [Unknown], you can see [Part of XXX], where XXX is the type of the referrer. 
+            if (ret.Length == 0)
+            {
+                if (!reference)
+                {
+                    if (iRelationshipManager.ReferencedByUnique != null)
+                    {
+                        string symbolString = iRelationshipManager.ReferencedByUnique.SymbolStringRef(true);
+
+                        if (!symbolString.Equals("[Unknown]"))
+                        {
+                            ret.Append("[Part of ");
+                            ret.Append(symbolString);
+                            ret.Append("]");
+                        }
+                        else
+                        {
+                            ret.Append("[Unknown]");
+                        }
+                    }
+                    else
+                    {
+                        ret.Append("[Unknown]");
+                    }
+                }
+                else
+                {
+                    ret.Append("[Unknown]");
+                }
+            }
+            return ret.ToString();
+        }
+
+        public string SymbolStringWithoutDescriptorPrefix
+        {
+            get
+            {
+                string ret = SymbolString;
+                //
+                if (IsDescriptor)
+                {
+                    ret = "[" + DescriptorLength.ToString("d4") + "] " + DescriptorTextBeautifiedWithoutLength;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public uint HeaderSize
+        {
+            get
+            {
+                uint size = 0;
+                //
+                switch (Type)
+                {
+                    case TType.EAllocated:
+                        size = HeapCell.AllocatedCellHeaderSize;
+                        break;
+                    case TType.EFree:
+                        size = KHeapCellSizeFree;
+                        break;
+                }
+                //
+                return size;
+            }
+        }
+
+        public uint PayloadLength
+        {
+            get { return (EndAddress - StartOfPayloadAddress) + 1; }
+        }
+
+        public RawItem this[uint aAddress]
+        {
+            get
+            {
+                RawItem ret = null;
+                //
+                TRegion region = RegionForAddress(aAddress);
+                if (region == TRegion.EPayload || region == TRegion.EHeader)
+                {
+                    if (region == TRegion.EHeader)
+                    {
+                        uint offset = aAddress - Address;
+                        int index = System.Convert.ToInt32(offset / RawItem.KSizeOfOneRawItemInBytes);
+                        //
+                        if (index < 0 || index >= HeaderRawItems.Count)
+                        {
+                            throw new ArgumentException("Address 0x" + aAddress.ToString("x8") + " is beyond this cell's header");
+                        }
+                        //
+                        ret = HeaderRawItems[index];
+                    }
+                    else
+                    {
+                        // Payload
+                        uint offset = aAddress - StartOfPayloadAddress;
+                        int index = System.Convert.ToInt32(offset / RawItem.KSizeOfOneRawItemInBytes);
+                        //
+                        if (index < 0 || index >= RawItems.Count)
+                        {
+                            throw new ArgumentException("Address 0x" + aAddress.ToString("x8") + " is beyond this cell's payload");
+                        }
+                        //
+                        ret = this[index];
+                    }
+                }
+                else
+                {
+                    throw new ArgumentException("Address 0x" + aAddress.ToString("x8") + " is not within this cell's extent");
+                }
+                return ret;
+            }
+        }
+
+        public RawItem this[int aIndex]
+        {
+            get
+            {
+                return iRawItems[aIndex];
+            }
+        }
+
+        public RawItemCollection RawItems
+        {
+            get { return iRawItems; }
+        }
+
+        public RawItemCollection HeaderRawItems
+        {
+            get { return iHeaderRawItems; }
+        }
+
+        public long CombinedLinkedCellPayloadLengths
+        {
+            get
+            {
+                int depth = 0;
+                long ret = DoGetCombinedLinkedCellPayloadLengths(ref depth);
+                return ret;
+            }
+        }
+
+        public long PayloadLengthIncludingLinkedCells
+        {
+            get
+            {
+                long ret = PayloadLength;
+                ret += RelationshipManager.PayloadLengthOfEmbeddedCells;
+                //
+                return ret;
+            }
+        }
+
+        public object Tag
+        {
+            get { return iTag; }
+            set { iTag = value; }
+        }
+
+        public uint Checksum
+        {
+            get { return iChecksum.Value; }
+        }
+
+        public bool IsUnknown
+        {
+            get { return Symbol == null && Type == TType.EAllocated; }
+        }
+        #endregion
+
+        #region Descriptor related functionality
+        public TDescriptorType DescriptorType
+        {
+            get
+            {
+                TDescriptorType ret = TDescriptorType.EUnknown;
+                //
+                if (IsDescriptor && iDescriptorInfo != null)
+                {
+                    ret = iDescriptorInfo.Type;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public bool IsDescriptorUnicode
+        {
+            get
+            {
+                bool ret = false;
+                //
+                if (IsDescriptor && iDescriptorInfo != null)
+                {
+                    ret = iDescriptorInfo.IsUnicode;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public bool IsDescriptor
+        {
+            get
+            {
+                return (iDescriptorInfo != null);
+            }
+        }
+
+        public int DescriptorLength
+        {
+            get
+            {
+                int length = 0;
+                //
+                if (IsDescriptor && iDescriptorInfo != null)
+                {
+                    length = iDescriptorInfo.Length;
+                }
+                //
+                return length;
+            }
+        }
+
+        public string DescriptorText
+        {
+            get
+            {
+                string ret = string.Empty;
+                //
+                if (IsDescriptor && iDescriptorInfo != null)
+                {
+                    ret = iDescriptorInfo.Text;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public string DescriptorTextBeautifiedWithoutLength
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                //
+                string des = DescriptorText;
+                if (des.Length > KMaxSymbolStringDescriptorLength)
+                {
+                    ret.Append(" \"");
+                    ret.Append(des.Substring(0, KMaxSymbolStringDescriptorLength));
+                    ret.Append("...\"");
+                }
+                else
+                {
+                    ret.Append(" \"");
+                    ret.Append(des);
+                    ret.Append("\"");
+                }
+                //
+                return ret.ToString();
+            }
+        }
+
+        public string DescriptorTextBeautified
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                //
+                ret.Append("{");
+                ret.Append(DescriptorLength.ToString("d4"));
+                ret.Append("}");
+                //
+                ret.Append(DescriptorTextBeautifiedWithoutLength);
+                //
+                return ret.ToString();
+            }
+        }
+        #endregion
+
+        #region Static properties
+        public static bool IsDebugAllocator
+        {
+            get
+            {
+                return AllocatedCellHeaderSize == AllocatedCellSizeByBuildType(TBuildType.EDebug);
+            }
+        }
+
+        public static uint FreeCellHeaderSize
+        {
+            get { return KFreeCellHeaderSize; }
+        }
+
+        public static uint AllocatedCellHeaderSize
+        {
+            get { return iAllocatedCellHeaderSize; }
+            set { iAllocatedCellHeaderSize = value; }
+        }
+        #endregion
+
+        #region Relationships
+        public RelationshipManager RelationshipManager
+        {
+            get { return iRelationshipManager; }
+        }
+        #endregion
+
+        #region IEnumerable Members
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return new HeapCellRawItemEnumerator(this);
+        }
+
+        IEnumerator<RawItem> IEnumerable<RawItem>.GetEnumerator()
+        {
+            return new HeapCellRawItemEnumerator(this);
+        }
+        #endregion
+
+        #region IEquatable<HeapCell> Members
+        public bool Equals(HeapCell aOther)
+        {
+            bool ret = (aOther.Address == this.Address);
+            return ret;
+        }
+        #endregion
+
+        #region Operators
+        public static bool operator ==(HeapCell aLeft, HeapCell aRight)
+        {
+            bool ret = false;
+
+            // If both are null, or both are same instance, return true.
+            if (System.Object.ReferenceEquals(aLeft, aRight))
+            {
+                ret = true;
+            }
+            else if (((object)aLeft == null) || ((object)aRight == null))
+            {
+                // If one is null, but not both, return false.
+                ret = false;
+            }
+            else
+            {
+                // Return true if the fields match:
+                ret = (aLeft.Address == aRight.Address);
+            }
+            //
+            return ret;
+        }
+
+        public static bool operator !=(HeapCell aLeft, HeapCell aRight)
+        {
+            return !(aLeft == aRight);
+        }
+        #endregion
+
+        #region From System.Object
+        public override int GetHashCode()
+        {
+            return Address.GetHashCode();
+        }
+
+        public override bool Equals(object aObject)
+        {
+            bool ret = false;
+            //
+            if (aObject is HeapCell)
+            {
+                HeapCell otherCell = (HeapCell)aObject;
+                ret = Equals(otherCell);
+            }
+            //
+            return ret;
+        }
+
+        public override string ToString()
+        {
+            string ret = "[0x" + Address.ToString("x8") + " " + TypeString + "]";
+            return ret;
+        }
+
+        public string ToStringExtended()
+        {
+            StringBuilder ret = new StringBuilder();
+
+            // Type
+            if (Type == HeapCell.TType.EAllocated)
+            {
+                if (IsDescriptor)
+                {
+                    ret.Append("[D]");
+                }
+                else
+                {
+                    ret.Append("[A]");
+                }
+            }
+            else
+            {
+                ret.Append("[F]");
+            }
+
+            // Address
+            ret.Append(" 0x" + Address.ToString("x8"));
+
+            // Symbol (if present)
+            if (Symbol != null)
+            {
+                ret.Append(" - " + SymbolString);
+            }
+            else if (IsDescriptor)
+            {
+                ret.Append(" - " + DescriptorTextBeautified);
+            }
+
+            return ret.ToString();
+        }
+        #endregion
+
+        #region Internal flags
+        [Flags]
+        private enum TFlags
+        {
+            EFlagsNone = 0,
+            EFlagsInCombiningCheck = 1
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KMaxRecursiveLinkedCellDepth = 5; // levels
+        private const int KMaxSymbolStringDescriptorLength = 128;
+        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;
+        }
+        #endregion
+
+        #region Data members
+        private static uint iAllocatedCellHeaderSize = 0;
+        private object iTag;
+        private uint iIndex;
+        private uint iAddress;
+        private uint iLength;
+        private TType iType = TType.EAllocated;
+        private TFlags iFlags = TFlags.EFlagsNone;
+        private Symbol[] iSymbol = new Symbol[3] { null, null, null };
+        private CRC32Checksum iChecksum = new CRC32Checksum();
+        private DescriptorInfo iDescriptorInfo = null;
+        private RawItemCollection iRawItems = new RawItemCollection();
+        private RawItemCollection iHeaderRawItems = new RawItemCollection();
+        private readonly RelationshipManager iRelationshipManager;
+        #endregion
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/HeapCellComparers.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace HeapLib.Cells
+{
+	internal class HeapCellComparerByAddress : IComparer<HeapCell>
+	{
+		#region IComparer Members
+        public int Compare( HeapCell aLeft, HeapCell aRight )
+		{
+			int ret = -1;
+			//
+            if ( aLeft.Address == aRight.Address )
+			{
+				ret = 0;
+			}
+            else if ( aLeft.Address > aRight.Address )
+			{
+				ret = 1;
+			}
+			//
+			return ret;
+		}
+		#endregion
+	}
+
+    internal class HeapCellComparerByType : IComparer<HeapCell>
+	{
+		#region IComparer Members
+        public int Compare( HeapCell aLeft, HeapCell aRight )
+        {
+			int ret = 1;
+			//
+            if ( aLeft.Type == aRight.Type )
+			{
+                // Then sort by address
+                ret = iAddressComparer.Compare( aLeft, aRight );
+            }
+            else if ( aLeft.Type == HeapCell.TType.EFree )
+			{
+				ret = -1;
+			}
+            else if ( aRight.Type == HeapCell.TType.EFree )
+			{
+				ret = 1;
+			}
+			//
+			return ret;
+		}
+		#endregion
+
+        #region Data members
+        private HeapCellComparerByAddress iAddressComparer = new HeapCellComparerByAddress();
+        #endregion
+    }
+
+    internal class HeapCellComparerByLength : IComparer<HeapCell>
+	{
+		#region IComparer Members
+        public int Compare( HeapCell aLeft, HeapCell aRight )
+        {
+			int ret = 1;
+			//
+            if ( aLeft.Length == aRight.Length )
+			{
+                // Then sort by address
+                ret = iAddressComparer.Compare( aLeft, aRight );
+			}
+            else if ( aLeft.Length > aRight.Length )
+			{
+				ret = -1;
+			}
+			//
+			return ret;
+		}
+		#endregion
+
+        #region Data members
+        private HeapCellComparerByAddress iAddressComparer = new HeapCellComparerByAddress();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Cells/HeapCellRawItemEnumerator.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,92 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils.RawItems;
+
+namespace HeapLib.Cells
+{
+    internal class HeapCellRawItemEnumerator : IEnumerator<RawItem>
+    {
+        #region Constructors & destructor
+        public HeapCellRawItemEnumerator( HeapCell aCell )
+        {
+            iCell = aCell;
+        }
+        #endregion
+
+        #region IEnumerator Members
+        void IEnumerator.Reset()
+        {
+            iCurrentIndex = -1;
+        }
+
+        object IEnumerator.Current
+        {
+            get
+            {
+                return iCell[ iCurrentIndex ];
+            }
+        }
+
+        bool IEnumerator.MoveNext()
+        {
+            return ( ++iCurrentIndex < iCell.RawItems.Count );
+        }
+        #endregion
+
+        #region From IEnumerator<RawItem>
+        RawItem IEnumerator<RawItem>.Current
+        {
+            get { return iCell[ iCurrentIndex ]; }
+        }
+        #endregion
+
+        #region From IDisposable
+        public void Dispose()
+        {
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCell iCell;
+        private int iCurrentIndex = -1;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Constants/HeapLibConstants.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections.Generic;
+
+namespace HeapLib.Constants
+{
+    public static class HeapLibConstants
+    {
+        #region API
+        public static string Version
+        {
+            get { return KVersion; }
+        }
+
+        public static string Copyright
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                ret.AppendFormat( "Copyright © {0} Nokia Corporation and/or its subsidiary(-ies). \nAll rights reserved.", 
+                                   DateTime.Now.Year );
+                return ret.ToString(); 
+            }
+        }
+        #endregion
+
+        #region Data members
+        private const string KVersion = "v1.1.0";
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/HeapDataJavaScriptLib.js	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+var info = document.createElement("div");
+var header = document.createElement("div");
+var body = document.createElement("div");
+
+function initialize()
+{
+     info.style.position="absolute";
+     info.style.visibility='hidden';
+
+     setGeneralStyle(header);
+
+     header.style.fontWeight='bold';
+     header.style.color='#4B7A98';
+     header.style.background='#D5EBF9';
+
+     setGeneralStyle(body);
+
+     body.style.borderTop='0px';
+     body.style.color='#1B4966';
+     body.style.background='#FFFFFF';
+
+     info.appendChild(header);
+     info.appendChild(body);
+
+     document.body.appendChild(info);
+}
+
+function setGeneralStyle(elm)
+{
+     elm.style.fontFamily='arial';
+     elm.style.fontSize='10';
+     elm.style.padding='2';
+     elm.style.border='1px solid #A5CFE9';
+}
+
+function showInfo(title, text, width)
+{
+     header.innerHTML = title;
+     body.innerHTML = text;
+ 
+     if ( width )
+     {
+          header.style.width = width + "px";
+          body.style.width = width + "px";
+     }
+     else
+     {
+          header.style.width = '180px';
+          body.style.width = '180px';
+     }
+ 
+     info.style.visibility = 'visible';
+}
+
+function hideInfo()
+{
+     info.style.visibility = 'hidden';
+}
+
+function mouseMove(e)
+{
+     if ( info.style.visibility == 'visible' )
+     {
+          var evt;
+
+          e?evt=e:evt=event;
+
+          var x, y;
+
+          if ( !evt.pageX )
+                x = evt.x + document.body.scrollLeft;
+          else
+                x = evt.pageX;
+
+          info.style.left = x + 15;
+
+          if ( !evt.pageY )
+                y  = evt.y + document.body.scrollTop;
+          else
+                y = evt.pageY;
+
+          info.style.top = y + 15;
+      }
+}
+
+function showMainFormCell( txt )
+{
+    var currentURL = parent.MainWindow.location.toString();
+    var hashPos = currentURL.indexOf('#');
+
+    if  ( hashPos >= 0 )
+    {
+        var hashArray = currentURL.split("#");
+        currentURL = hashArray[ 0 ];
+    }
+
+    var newURL = currentURL + '#Cell_' + txt;
+ 
+    parent.MainWindow.location = newURL;
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/HeapLib.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,262 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <ProjectType>Local</ProjectType>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{D638AB12-FC64-4523-9B99-09F20BC2A791}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ApplicationIcon>
+    </ApplicationIcon>
+    <AssemblyKeyContainerName>
+    </AssemblyKeyContainerName>
+    <AssemblyName>HeapLib</AssemblyName>
+    <AssemblyOriginatorKeyFile>
+    </AssemblyOriginatorKeyFile>
+    <DefaultClientScript>JScript</DefaultClientScript>
+    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+    <DefaultTargetSchema>IE50</DefaultTargetSchema>
+    <DelaySign>false</DelaySign>
+    <OutputType>Library</OutputType>
+    <RootNamespace>HeapLib</RootNamespace>
+    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+    <StartupObject>
+    </StartupObject>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>true</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>false</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>false</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>none</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="Array\HeapCellArrayBase.cs" />
+    <Compile Include="Array\HeapCellArrayUnsorted.cs" />
+    <Compile Include="Array\HeapCellArray.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Array\HeapCellArrayAllocationNumberMap.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Array\HeapCellArrayEnumerator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Array\HeapCellArrayWithStatistics.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Cells\Descriptors\DescriptorAlgorithmBase.cs" />
+    <Compile Include="Cells\Descriptors\DescriptorAlgorithmManager.cs" />
+    <Compile Include="Cells\Descriptors\DescriptorInfo.cs" />
+    <Compile Include="Cells\Descriptors\Implementations\Ascii\DesAsciiAlgorithmNullTerminatedString.cs" />
+    <Compile Include="Cells\Descriptors\Implementations\Ascii\DesAsciiAlgorithmBase.cs" />
+    <Compile Include="Cells\Descriptors\Implementations\Ascii\DesAsciiAlgorithmHBufC.cs" />
+    <Compile Include="Cells\Descriptors\Implementations\Ascii\DesAsciiAlgorithmModifiableBuffers.cs" />
+    <Compile Include="Cells\Descriptors\Implementations\Unicode\DesUnicodeAlgorithmModifiableBuffers.cs" />
+    <Compile Include="Cells\Descriptors\Implementations\Unicode\DesUnicodeAlgorithmBase.cs" />
+    <Compile Include="Cells\Descriptors\Implementations\Unicode\DesUnicodeAlgorithmHBufC.cs" />
+    <Compile Include="Cells\HeapCell.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Cells\HeapCellComparers.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Constants\HeapLibConstants.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Extractor\Base\Extractor.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Extractor\ExtractorFactory.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Extractor\Implementations\ExtractorText.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Extractor\ExtractedData.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Extractor\Implementations\ExtractorBinary.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Interpreter\InterpreterFactory.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Interpreter\Implementations\InterpreterBinary.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Interpreter\Implementations\InterpreterText.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Interpreter\Base\InterpreterBase.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Readers\ReaderFile.cs" />
+    <Compile Include="Reconstructor\DataSources\Analyser\Readers\ReaderLines.cs" />
+    <Compile Include="Reconstructor\DataSources\Source\DataSource.cs" />
+    <Compile Include="Reconstructor\DataSources\Thread\DataSourceThreadCollection.cs" />
+    <Compile Include="Reconstructor\DataSources\Thread\DataSourceThread.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Data\GlobalData.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Groups\GpChunks.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Groups\GpHeapAllocCell.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Groups\GpHeapFreeCell.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Groups\GpHeap.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Groups\GpFooter.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Groups\GpHeader.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Data\StackData.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\Data\HeapData.cs" />
+    <Compile Include="Reconstructor\DataSources\Elements\MetaData.cs" />
+    <Compile Include="Reconstructor\RHeap\Extractor\ExtractionState.cs" />
+    <Compile Include="Reconstructor\RHeap\Extractor\ExtractionManager.cs" />
+    <Compile Include="Reconstructor\RHeap\Extractor\Extractor.cs" />
+    <Compile Include="Reconstructor\RHeap\Extractor\RawItemPrecursor.cs" />
+    <Compile Include="Reconstructor\RHeap\Extractor\RawItemQueue.cs" />
+    <Compile Include="Relationships\RelationshipDictionary.cs" />
+    <Compile Include="Relationships\RelationshipCollection.cs" />
+    <Compile Include="Relationships\RelationshipInfo.cs" />
+    <Compile Include="Relationships\RelationshipManager.cs" />
+    <Compile Include="Cells\HeapCellRawItemEnumerator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Misc\HeapViewFormObjects.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Output_HTML\HeapToHTMLConverter.cs">
+    </Compile>
+    <Compile Include="Output_HTML\HeapToHTMLPageEntireListing.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Output_HTML\HeapToHTMLPageHeapCellManager.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Output_HTML\HeapToHTMLPageHeapData.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Output_HTML\HeapToHTMLPageHeapLinkedCells.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Output_HTML\HeapToHTMLPageIndex.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Output_HTML\HeapToHTMLPageJavaScriptManager.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Output_Text\HeapToFileConverter.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Reconstructor\HeapReconstructor.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Reconstructor\DataSources\Source\DataSourceCollection.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Reconstructor\DataSources\Analyser\DataSourceAnalyser.cs" />
+    <Compile Include="Reconstructor\Misc\Options.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Reconstructor\Misc\Prefixes.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Relationships\RelationshipInspector.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Distribution\HeapCellSizeDistribution.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Distribution\HeapCellSizeDistributionEnumerator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\HeapStatistics.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Tracking\Base\TrackingCollectionBase.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Tracking\Base\TrackingComparisonObjects.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Tracking\Base\TrackingInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Tracking\ByUnknown\UnknownTrackingInfoCollection.cs" />
+    <Compile Include="Statistics\Tracking\ByDescriptor\DescriptorTrackingInfoCollection.cs" />
+    <Compile Include="Statistics\Tracking\ByObject\ObjectTrackingInfoCollection.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Tracking\BySymbol\SymbolTrackingInfoCollection.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Types\HeapStatisticsAllocated.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Types\HeapStatisticsBase.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Statistics\Types\HeapStatisticsFree.cs">
+      <SubType>Code</SubType>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.XML" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianDebugLib\SymbianDebugLib.csproj">
+      <Project>{796DD82D-9E7D-476D-B700-086CD9A893DA}</Project>
+      <Name>SymbianDebugLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianStructuresLib\SymbianStructuresLib.csproj">
+      <Project>{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}</Project>
+      <Name>SymbianStructuresLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianZipLib\SymbianZipLib.csproj">
+      <Project>{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}</Project>
+      <Name>SymbianZipLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="HeapDataJavaScriptLib.js">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>
+    </PreBuildEvent>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/HeapLib.csproj.user	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,57 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <LastOpenVersion>7.10.6030</LastOpenVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ReferencePath>D:\Programming\Visual Studio Projects\SourceLibrary\SourceLibrary\bin\Debug\;C:\USERS\Visual Studio Projects\SourceLibrary\SourceLibrary\bin\Debug\;D:\My Documents\Visual Studio Projects\SourceLibrary\SourceLibrary\bin\Debug\;C:\USERS\Visual Studio Projects\ShellUtils\bin\Debug\;D:\My Documents\Visual Studio Projects\ShellUtils\bin\Debug\;C:\USERS\Visual Studio Projects\Libs\SourceLibrary\SourceLibrary\bin\Debug\;C:\USERS\Visual Studio Projects\Libs\ShellUtils\bin\Debug\;C:\Documents and Settings\PC User\My Documents\Visual Studio Projects\Libs\SourceLibrary\SourceLibrary\bin\Debug\;C:\Documents and Settings\PC User\My Documents\Visual Studio Projects\Libs\ShellUtils\bin\Debug\</ReferencePath>
+    <CopyProjectDestinationFolder>
+    </CopyProjectDestinationFolder>
+    <CopyProjectUncPath>
+    </CopyProjectUncPath>
+    <CopyProjectOption>0</CopyProjectOption>
+    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectTrust>0</ProjectTrust>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Misc/HeapViewFormObjects.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapLib.Cells;
+
+namespace HeapLib
+{
+	public class HeapViewGridCell
+	{
+		#region Constructors & destructor
+		public HeapViewGridCell()
+		{
+		}
+
+		public HeapViewGridCell( HeapCell aHeapCell, object aCaption, HeapCell.TRegion aRegion )
+		{
+			HeapCell = aHeapCell;
+			Caption = aCaption;
+			Region = aRegion;
+		}
+		#endregion
+
+		#region Properties
+		public HeapCell HeapCell
+		{
+			get { return iHeapCell; }
+			set { iHeapCell = value; }
+		}
+
+		public object Caption
+		{
+			get { return iCaption; }
+			set { iCaption = value; }
+		}
+
+		public HeapCell.TRegion Region
+		{
+			get { return iRegion; }
+			set { iRegion = value; }
+		}
+		#endregion
+
+		#region From System.Object
+		public override string ToString()
+		{
+			return iCaption.ToString();
+		}
+		#endregion
+
+		#region Data members
+		private object iCaption;
+		private HeapCell iHeapCell;
+		private HeapCell.TRegion iRegion;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLConverter.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,319 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections.Generic;
+using System.ComponentModel;
+using SymbianUtils;
+using HeapLib.Reconstructor;
+
+namespace HeapLib
+{
+	public class HeapToHTMLConverter
+    {
+        #region Enumerations
+        public enum TEvent
+        {
+            EEventStarted = 0,
+            EEventProgress,
+            EEventComplete
+        }
+        #endregion
+
+        #region Delegates & events
+        public delegate void EventHandler( TEvent aEvent );
+        public event EventHandler Observer;
+        #endregion
+
+        #region Constructors
+        public HeapToHTMLConverter( HeapReconstructor aReconstructor, string aBaseOutputPath )
+		{
+			iReconstructor = aReconstructor;
+			iBaseOutputPath = aBaseOutputPath;
+			
+			// Make sure output base path exists
+			DirectoryInfo dirInfo = new DirectoryInfo( aBaseOutputPath );
+			if	( dirInfo.Exists == false )
+			{
+				dirInfo.Create();
+			}
+        }
+		#endregion
+
+        #region API
+        public void Convert( TSynchronicity aSynchronicity )
+        {
+            switch ( aSynchronicity )
+            {
+            default:
+            case TSynchronicity.EAsynchronous:
+                CreateWorkers();
+                break;
+            case TSynchronicity.ESynchronous:
+                throw new NotSupportedException();
+            }
+        }
+
+        public static string PageFileNameEnsuringPathExists( string aName, string aBasePath, string aSubDir )
+        {
+            return PageFileNameEnsuringPathExists( aName, aBasePath, aSubDir, KHtmlFileExtension );
+        }
+
+        public static string PageFileNameEnsuringPathExists( string aName, string aBasePath, string aSubDir, string aExtension )
+        {
+            string directory = PageDirectoryNameEnsuringPathExists( aBasePath, aSubDir );
+            string fileName = fileName = Path.Combine( directory, aName + aExtension );
+
+            // Make sure filename does not exist
+            FileInfo fileInfo = new FileInfo( fileName );
+            if ( fileInfo.Exists )
+            {
+                fileInfo.Delete();
+            }
+            //
+            return fileName;
+        }
+
+        public static string PageDirectoryNameEnsuringPathExists( string aBasePath, string aSubDir )
+        {
+            string directory = aBasePath;
+            if ( aSubDir != string.Empty )
+            {
+                directory = Path.Combine( directory, aSubDir );
+            }
+
+            // Make sure directory exists
+            DirectoryInfo dirInfo = new DirectoryInfo( directory );
+            if ( dirInfo.Exists == false )
+            {
+                dirInfo.Create();
+            }
+
+            return directory;
+        }
+        #endregion
+
+        #region Properties
+        public int Progress
+        {
+            get
+            {
+                long pos = 0;
+                //
+                pos += iPageIndex.Position;
+                pos += iPageEntireListingByAddress.Position;
+                pos += iPageEntireListingByType.Position;
+                pos += iPageEntireListingByLength.Position;
+                pos += iPageHeapCellManager.Position;
+                pos += iPageJavaScriptManager.Position;
+                //
+                long size = Size;
+                float progress = (((float) pos / (float) size ) ) * 100.0f;
+                //
+                return (int) progress;
+            }
+        }
+        #endregion
+
+        #region Internal properties
+        private long Size
+		{
+			get
+			{
+				long size = 0;
+				//
+				size += iPageIndex.Size;
+				size += iPageEntireListingByAddress.Size;
+				size += iPageEntireListingByType.Size;
+				size += iPageEntireListingByLength.Size;
+				size += iPageHeapCellManager.Size;
+				size += iPageJavaScriptManager.Size;
+				//
+				return size;
+			}
+		}
+
+        private bool IsComplete
+        {
+            get
+            {
+                int count = iCompletionStatuses.Count;
+
+                // Count number of finished writers
+                int completeCount = 0;
+                foreach ( KeyValuePair<AsyncTextWriterBase, bool> entry in iCompletionStatuses )
+                {
+                    if ( entry.Value == KWriterIsComplete )
+                    {
+                        ++completeCount;
+                    }
+                }
+
+                return ( completeCount == count );
+            }
+        }
+		#endregion
+
+		#region Internal methods
+        private void CreateWorkers()
+		{
+            // Create all the writers first
+			iPageIndex = new HeapToHTMLPageIndex( iReconstructor, PageFileNameEnsuringPathExists( "Index" ) );
+            iPageIndex.iObserver += new AsyncTextWriterBase.Observer( WriterObserver );
+            //
+			string entireListingFileNameByAddress = HeapToHTMLPageEntireListing.PageFileName( HeapToHTMLPageEntireListing.TSortType.ESortTypeByAddress );
+			entireListingFileNameByAddress = PageFileNameEnsuringPathExists( entireListingFileNameByAddress, iBaseOutputPath, string.Empty, string.Empty );
+			iPageEntireListingByAddress = new HeapToHTMLPageEntireListing( iReconstructor, HeapToHTMLPageEntireListing.TSortType.ESortTypeByAddress, entireListingFileNameByAddress );
+            iPageEntireListingByAddress.iObserver += new AsyncTextWriterBase.Observer( WriterObserver );
+			//
+			string entireListingFileNameByType = HeapToHTMLPageEntireListing.PageFileName( HeapToHTMLPageEntireListing.TSortType.ESortTypeByType );
+			entireListingFileNameByType = PageFileNameEnsuringPathExists( entireListingFileNameByType, iBaseOutputPath, string.Empty, string.Empty );
+			iPageEntireListingByType = new HeapToHTMLPageEntireListing( iReconstructor, HeapToHTMLPageEntireListing.TSortType.ESortTypeByType, entireListingFileNameByType );
+            iPageEntireListingByType.iObserver += new AsyncTextWriterBase.Observer( WriterObserver );
+			//
+			string entireListingFileNameByLength = HeapToHTMLPageEntireListing.PageFileName( HeapToHTMLPageEntireListing.TSortType.ESortTypeByLength );
+			entireListingFileNameByLength = PageFileNameEnsuringPathExists( entireListingFileNameByLength, iBaseOutputPath, string.Empty, string.Empty );
+			iPageEntireListingByLength = new HeapToHTMLPageEntireListing( iReconstructor, HeapToHTMLPageEntireListing.TSortType.ESortTypeByLength, entireListingFileNameByLength );
+            iPageEntireListingByLength.iObserver += new AsyncTextWriterBase.Observer( WriterObserver );
+			//
+			iPageHeapCellManager = new HeapToHTMLPageHeapCellManager( iReconstructor, iBaseOutputPath );
+            iPageHeapCellManager.iObserver += new AsyncTextWriterBase.Observer( WriterObserver );
+			//
+			iPageJavaScriptManager = new HeapToHTMLPageJavaScriptManager( iReconstructor, iBaseOutputPath );
+            iPageJavaScriptManager.iObserver += new AsyncTextWriterBase.Observer( WriterObserver );
+
+            // Reset their completion statuses so that we're ready to start anew
+            ResetCompletionStatuses();
+
+            // Now it's safe to start all the writers running.
+            iPageIndex.AsyncWrite();
+            iPageEntireListingByAddress.AsyncWrite();
+            iPageEntireListingByType.AsyncWrite();
+            iPageEntireListingByLength.AsyncWrite();
+            iPageHeapCellManager.AsyncWrite();
+            iPageJavaScriptManager.AsyncWrite();
+        }
+
+        private void ResetCompletionStatuses()
+        {
+            SetCompletionState( iPageIndex, false );
+            SetCompletionState( iPageEntireListingByAddress, false );
+            SetCompletionState( iPageEntireListingByType, false );
+            SetCompletionState( iPageEntireListingByLength, false );
+            SetCompletionState( iPageHeapCellManager, false );
+            SetCompletionState( iPageJavaScriptManager, false );
+        }
+
+        private void WriterObserver( AsyncTextWriterBase.TEvent aEvent, AsyncTextWriterBase aObject )
+        {
+            if ( aEvent == AsyncTextWriterBase.TEvent.EWritingComplete )
+            {
+                SetCompletionState( aObject, KWriterIsComplete );
+                CheckForCompletion();
+            }
+            else if ( aEvent == AsyncTextWriterBase.TEvent.EWritingStarted )
+            {
+                SetCompletionState( aObject, KWriterIsIncomplete );
+            }
+            else
+            {
+                NotifyEvent( TEvent.EEventProgress );
+            }
+        }
+
+        private void NotifyEvent( TEvent aEvent )
+        {
+            if ( Observer != null )
+            {
+                Observer( aEvent );
+            }
+        }
+    
+        private void CheckForCompletion()
+        {
+            // If all writers are completed, then notify "ready" event
+            bool complete = IsComplete;
+            if ( complete )
+            {
+                NotifyEvent( TEvent.EEventComplete );
+            }
+        }
+
+        private void SetCompletionState( AsyncTextWriterBase aObject, bool aComplete )
+        {
+            if ( !iCompletionStatuses.ContainsKey( aObject ) )
+            {
+                iCompletionStatuses.Add( aObject, aComplete );
+            }
+            else
+            {
+                iCompletionStatuses[ aObject ] = aComplete;
+            }
+        }
+
+        private string PageFileNameEnsuringPathExists( string aName )
+		{
+			return PageFileNameEnsuringPathExists( aName, string.Empty );
+		}
+
+		private string PageFileNameEnsuringPathExists( string aName, string aSubDir )
+		{
+			return PageFileNameEnsuringPathExists( aName, iBaseOutputPath, aSubDir );
+		}
+		#endregion
+
+		#region Constants
+		private const string KHtmlFileExtension = ".html";
+        private const bool KWriterIsComplete = true;
+        private const bool KWriterIsIncomplete = false;
+		#endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		private readonly string iBaseOutputPath;
+        private Dictionary<AsyncTextWriterBase, bool> iCompletionStatuses = new Dictionary<AsyncTextWriterBase, bool>();
+		private HeapToHTMLPageIndex iPageIndex;
+		private HeapToHTMLPageEntireListing iPageEntireListingByAddress;
+		private HeapToHTMLPageEntireListing iPageEntireListingByType;
+		private HeapToHTMLPageEntireListing iPageEntireListingByLength;
+		private HeapToHTMLPageHeapCellManager iPageHeapCellManager;
+		private HeapToHTMLPageJavaScriptManager iPageJavaScriptManager;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageEntireListing.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,612 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using SymbianUtils;
+using SymbianUtils.RawItems;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics.Tracking.Base;
+using HeapLib.Reconstructor;
+
+namespace HeapLib
+{
+	public class HeapToHTMLPageEntireListing : AsyncHTMLFileWriter
+	{
+		#region Enumerations
+		public enum TSortType
+		{
+			ESortTypeByAddress = 0,
+			ESortTypeByType,
+			ESortTypeByLength
+		}
+		#endregion
+
+		#region Constructors & destructor
+		public HeapToHTMLPageEntireListing( HeapReconstructor aReconstructor, TSortType aSortType, string aFileName )
+			:	base( aFileName )
+		{
+            iSortType = aSortType;
+            iReconstructor = aReconstructor;
+
+            // Make a new (but empty) array
+            iEntries = new HeapCellArray( aReconstructor.Data.Count + 1 );
+			
+            // Depending on the sort type, trigger the sort method
+            // in the array. Since the array is empty this won't
+            // do a lot, except set up the array to use our chosen
+            // comparison object...
+			switch( iSortType )
+			{
+			default:
+			case TSortType.ESortTypeByAddress:
+                iEntries.SortByAddress();
+				break;
+			case TSortType.ESortTypeByType:
+                iEntries.SortByType();
+				break;
+			case TSortType.ESortTypeByLength:
+                iEntries.SortByLength();
+				break;
+			}
+            
+            // Now copy the entries into the array
+            iEntries.Copy( aReconstructor.Data );
+        }
+		#endregion
+		
+		#region API
+		public static string PageFileName( TSortType aSortType )
+		{
+			string ret = "EntireHeapListing_";
+			//
+			switch( aSortType )
+			{
+			default:
+			case TSortType.ESortTypeByAddress:
+				ret += "ByAddress";
+				break;
+			case TSortType.ESortTypeByType:
+				ret += "ByType";
+				break;
+			case TSortType.ESortTypeByLength:
+				ret += "ByLength";
+				break;
+			}
+			//
+			ret += ".html";
+			//
+			return ret;
+		}
+
+		public static string HeapCellLinkIdentifierName( HeapCell aCell )
+		{
+			string ret = "Cell_" + aCell.Address.ToString("x8");
+			return ret;
+		}
+		#endregion
+
+		#region Internal state related
+		private enum TState
+		{
+			EStateHeader = 0,
+			EStateBody,
+			EStateFooter,
+			EStateDone
+		}
+
+		private TState State
+		{
+			get { return iState; }
+			set { iState = value; }
+		}
+
+		private void OnStateHeader()
+		{
+			WriteDocumentBegin();
+			WriteHeadBegin();
+			WriteTitle( "Heap Information" );
+
+			#region Styles
+			WriteStyleBegin();
+				WriteStyleName( "td, tr, p, li" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 10pt;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteLine( "a:link { text-decoration: none; color:  #0000CC }" );
+				WriteLine( "a:visited { text-decoration: none; color:  #0000CC }" );
+				WriteLine( "a:active { text-decoration: none; color:  #0000CC }" );
+				WriteLine( "a:hover { text-decoration: underline; color:  #0000CC }" );
+
+				WriteStyleName( ".rawData" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: courier, courier new, monospace;" );
+				WriteStyleBody( "font-size: 10pt;" );
+				WriteStyleBody( "color: #000099;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableHeaders" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 12pt;" );
+				WriteStyleBody( "color: #000000; font-weight: bold;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBody(	"border-bottom: #000000 1px solid;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableHeaderSelected" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 12pt;" );
+				WriteStyleBody( "color: #FF0000; font-weight: bold;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBody(	"border-bottom: #000000 1px solid;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableBorder" );
+				WriteStyleBodyBegin();
+				WriteStyleBody(	"border-width: 1px;" );
+				WriteStyleBody( "border-style: solid;" );
+				WriteStyleBody(	"border-color: #000000;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableRowTitle" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "background-color: #DDDDDD;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableRowBody1" );
+				WriteStyleBodyBegin();
+                WriteStyleBody( "background-color: #FFFFFF;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableRowFreeCell" );
+				WriteStyleBodyBegin();
+                WriteStyleBody( "background-color: #C5F5F1;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableRowBody2" );
+				WriteStyleBodyBegin();
+                WriteStyleBody( "background-color: #EEEEEE;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".freeCell" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: courier, courier new, monospace;" );
+				WriteStyleBody( "font-size: 10pt;" );
+				WriteStyleBody( "color: #009900;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+			WriteStyleEnd();
+			#endregion
+
+			WriteLine( "<SCRIPT SRC=\"HeapData/" + HeapToHTMLPageJavaScriptManager.JavaScriptHelperFileName + "\"></SCRIPT>" );
+
+			WriteHeadEnd();
+
+			WriteBodyBegin();
+
+			WriteDivisionBegin( AsyncHTMLFileWriter.TAlignment.EAlignCenter );
+			
+			Writer.WriteLine( "<TABLE width=\"65%\" cellspacing=\"3\" cellpadding=\"3\">" );
+			WriteTableRowBegin();
+			WriteTableColumnBegin();
+
+				Writer.WriteLine( "<TABLE class=\"tableBorder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">" );
+
+				// Set up table columns. If we've got a debug version of EUSER then
+				// we can show the allocation numbers.
+				Writer.WriteLine( "<TR class=\"tableRowTitle\">" );
+
+					MakeColumnHeading( "Address", TAlignment.EAlignLeft, TSortType.ESortTypeByAddress );
+					MakeColumnHeading( "Type", TAlignment.EAlignCenter, TSortType.ESortTypeByType );
+
+					if	( iReconstructor.SourceData.MetaData.Heap.DebugAllocator )
+					{
+						WriteTableColumn( "Alloc #", TAlignment.EAlignCenter, "tableHeaders" );
+					}
+					MakeColumnHeading( "Length", TAlignment.EAlignCenter, TSortType.ESortTypeByLength );
+
+					WriteTableColumn( "&nbsp", "tableHeaders" );
+					WriteTableColumn( "Symbol", TAlignment.EAlignLeft, "tableHeaders" );
+					WriteTableColumn( "Object Name", TAlignment.EAlignLeft, "tableHeaders" );
+
+				WriteTableRowEnd();
+
+				#region Blank row
+				WriteTableRowBegin();
+					WriteTableColumnEmpty();
+					WriteTableColumnEmpty();
+                    if ( iReconstructor.SourceData.MetaData.Heap.DebugAllocator )
+					{
+						WriteTableColumnEmpty();
+					}
+					WriteTableColumnEmpty();
+					WriteTableColumnEmpty();
+					WriteTableColumnEmpty();
+					WriteTableColumnEmpty();
+				WriteTableRowEnd();
+				#endregion
+		}
+
+		private void OnStateBody()
+		{
+			HeapCell entry = iEntries[ iCurrentHeapCellIndex++ ];
+			string link;
+			string body = string.Empty;
+
+			string style = TableRowBodyStyleName;
+			if	( entry.Type == HeapCell.TType.EFree )
+			{
+				style = "tableRowFreeCell";
+			}
+			Writer.WriteLine( "<TR class=\"" + style + "\">" );
+
+			// Address
+			WriteTableColumnBegin();
+			WriteDivisionBeginWithId( HeapCellLinkIdentifierName( entry ) );
+			string cellAddress = "0x" + entry.Address.ToString("x8");
+			MakeAddressLink( entry );
+			WriteDivisionEnd();
+			WriteTableColumnEnd();
+		
+			// Type
+			string typeProperName = string.Empty;
+			if	( entry.Type == HeapCell.TType.EAllocated )
+			{
+				typeProperName = "Allocated";
+				body = CreateCellContentsQuickView( entry );
+			}
+			else if ( entry.Type == HeapCell.TType.EFree )
+			{
+				typeProperName = "Free";
+				body = CreateCellContentsQuickView( entry );
+			}
+
+			link = HeapToHTMLPageJavaScriptManager.MakeToolTipDiv( typeProperName + " Cell", body, typeProperName, KHeapDataPreviewLength );
+			WriteTableColumnBegin( TAlignment.EAlignCenter, string.Empty );
+			WriteLine( link );
+			WriteTableColumnEnd();
+
+			// Alloc number
+            if ( iReconstructor.SourceData.MetaData.Heap.DebugAllocator )
+			{
+				link = HeapToHTMLPageJavaScriptManager.MakeToolTipDiv( "Allocation Number", "Number " + entry.AllocationNumber.ToString() + " of " + iEntries.Count.ToString() + " cells.", entry.AllocationNumber.ToString() );
+				
+				WriteTableColumnBegin( TAlignment.EAlignRight, string.Empty );
+				WriteLine( link );
+				WriteTableColumnEnd();
+			}
+
+			// Cell length
+			body = string.Empty;
+			body += "Type:    " + typeProperName + "<BR>";
+			body += "Header:  " + entry.HeaderSize.ToString() + " bytes<BR>";
+			body += "Payload: " + entry.PayloadLength.ToString() + " bytes<BR><BR>";
+			if	( entry.Type == HeapCell.TType.EFree )
+			{
+                string instanceSizeAsPercentageOfTotal = iReconstructor.Statistics.CellLengthAsHeapPercentage( entry ).ToString("##0.000");
+				body += "This individual cell corresponds to " + instanceSizeAsPercentageOfTotal + " of the total free cells in this heap.";
+			}
+            link = HeapToHTMLPageJavaScriptManager.MakeToolTipDiv( "Cell Length", body, entry.Length.ToString() );
+			WriteTableColumnBegin( TAlignment.EAlignRight, string.Empty );
+			WriteLine( link );
+			WriteTableColumnEnd();
+
+			// Spacer
+			WriteTableColumnSpace();
+
+			// Symbol
+			if	( entry.Symbol != null )
+			{
+                // Get symbol tracking info.
+                TrackingInfo trackingInfo = iReconstructor.Statistics.StatsAllocated.TrackerSymbols[ entry.Symbol ];
+				System.Diagnostics.Debug.Assert( trackingInfo != null );
+                string instanceSizeAsPercentageOfTotal = iReconstructor.Statistics.CellLengthAsHeapPercentage( entry ).ToString("##0.000") + "%";
+                string totalSymbolicSizeAsPercentageOfTotal = NumberFormattingUtils.NumberAsPercentageThreeDP( trackingInfo.AssociatedMemory, iReconstructor.Statistics.SizeTotal ) + "%";
+
+				body = string.Empty;
+				if	( trackingInfo.Count > 1 )
+				{
+					body += "There are " + trackingInfo.Count.ToString() + " other instances of this symbol ";
+				}
+				else
+				{
+					body += "This is the only instance of this symbol ";
+				}
+				body += "and each instance is using " + trackingInfo.PayloadLength.ToString() + " bytes of memory (plus cell header overhead).<BR><BR>";
+				body += "Of the total allocated heap memory, cells associated with this symbolic are using a total of " + trackingInfo.AssociatedMemory.ToString() + " bytes (" + totalSymbolicSizeAsPercentageOfTotal + " of total heap) memory.<BR><BR>";
+				body += "This individual cell corresponds to " + instanceSizeAsPercentageOfTotal + " of the total " + typeProperName + " heap space.<BR>";
+
+                link = HeapToHTMLPageJavaScriptManager.MakeToolTipDiv( "Symbol Information", body, entry.Symbol.NameWithoutVTablePrefix );
+				WriteTableColumnBegin( TAlignment.EAlignLeft, string.Empty );
+				WriteLine( link );
+				WriteTableColumnEnd();
+			}
+			else
+			{
+				WriteTableColumnEmpty();
+			}
+
+			// Object name	
+			if	( entry.Symbol != null )
+			{
+				WriteTableColumn( entry.Symbol.ObjectWithoutSection, TAlignment.EAlignLeft ); 
+			}
+			else
+			{
+				WriteTableColumnEmpty();
+			}
+
+			WriteTableRowEnd();
+		}
+
+		private void OnStateFooter()
+		{
+			WriteTableEnd();
+
+			WriteTableColumnEnd();
+			WriteTableRowEnd();
+			WriteTableEnd();
+			WriteDivisionEnd();
+
+			WriteBodyEnd();
+
+			WriteDocumentEnd();
+		}
+		#endregion
+
+		#region From AsyncTextWriterBase
+		protected override bool ContinueProcessing()
+		{
+			return ( State != TState.EStateDone );
+		}
+
+        public override long Size
+		{
+			get
+			{
+				return (long) iEntries.Count + 2;
+			}
+		}
+
+        public override long Position
+		{
+			get
+			{
+				long pos = 0;
+				//
+				switch( State )
+				{
+				case TState.EStateHeader:
+					pos = 1;
+					break;
+				case TState.EStateBody:
+					pos = (long) (1 + iCurrentHeapCellIndex);
+					break;
+				case TState.EStateFooter:
+					pos = (long) (2 + iCurrentHeapCellIndex);
+					break;
+				default:
+					pos = (long) iEntries.Count + 2;
+					break;
+				}
+				//
+				return pos;
+			}
+		}
+
+        public override void ExportData()
+		{
+			switch( State )
+			{
+			case TState.EStateHeader:
+				OnStateHeader();
+				State = TState.EStateBody;
+				break;
+			case TState.EStateBody:
+				OnStateBody();
+				if	( iCurrentHeapCellIndex >= iEntries.Count )
+				{
+					State = TState.EStateFooter;
+				}
+				break;
+			case TState.EStateFooter:
+				OnStateFooter();
+				State = TState.EStateDone;
+				break;
+			}
+
+		}
+		#endregion
+
+		#region Internal methods
+		private string CreateCellContentsQuickView( HeapCell aCell )
+		{
+			const int KDWordsPerLine = 4;
+
+			StringBuilder ret = new StringBuilder();
+			//
+			ret.Append( "<table>" );
+
+			int rawItemsCount = Math.Min( KDWordsPerLine * 2, aCell.RawItems.Count );
+			for( int i=0; i<rawItemsCount; i += KDWordsPerLine )
+			{
+				ret.Append( "<tr>" );
+
+				// Work out how many items on this line
+				int runIndex;
+				int runExtent = i + KDWordsPerLine;
+				RawItem rawItem = null;
+				
+				// First set of columns - original data
+				for( runIndex = i; runIndex < runExtent; runIndex++ )
+				{
+					// Get the item
+					if	( runIndex < rawItemsCount )
+					{
+						rawItem = aCell[ runIndex ];
+						ret.Append( "<td align=center>" + rawItem.OriginalData.ToString("x8") + "</td>" );
+					}
+					else
+					{
+						ret.Append( "<td></td>" );
+						rawItem = null;
+					}
+				}
+				
+				ret.Append( "<td>&nbsp;</td>" );
+
+				// Second set of columns - characterised data
+				for( runIndex = i; runIndex < runExtent; runIndex++ )
+				{
+					// Get the item
+					if	( runIndex < rawItemsCount )
+					{
+						rawItem = aCell[ runIndex ];
+						ret.Append( "<td align=center>" + HTMLEntityUtility.Entitize( rawItem.OriginalCharacterisedData ) + "</td>" );
+					}
+					else
+					{
+						ret.Append( "<td></td>" );
+						rawItem = null;
+					}
+				}
+				
+				ret.Append( "</tr>" );
+			}
+			ret.Append( "</table>" );
+			//
+			return ret.ToString();
+		}
+
+		private string TableRowBodyStyleName
+		{
+			get
+			{
+				string ret = "tableRowBody";
+				ret += iTableBodyRowStyleAlternator.ToString("d1");
+				//
+				if	( iTableBodyRowStyleAlternator == 2 )
+				{
+					iTableBodyRowStyleAlternator = 1;
+				}
+				else
+				{
+					iTableBodyRowStyleAlternator = 2;
+				}
+				//
+				return ret;
+			}
+		}
+
+		private void MakeColumnHeading( string aTitle, TAlignment aAlignment, TSortType aSortType )
+		{
+			if	( iSortType != aSortType )
+			{
+				string toolTipBody = "Sort by ";
+				//
+				switch( aSortType )
+				{
+				default:
+				case TSortType.ESortTypeByAddress:
+					toolTipBody += "address";
+					break;
+				case TSortType.ESortTypeByType:
+					toolTipBody += "type";
+					break;
+				case TSortType.ESortTypeByLength:
+					toolTipBody += "length";
+					break;
+				}
+				//
+				string url = PageFileName( aSortType );
+				string linkWithToolTip = HeapToHTMLPageJavaScriptManager.MakeToolTipLink( "Sorting", toolTipBody, url, string.Empty, aTitle );
+				//
+				WriteTableColumnBegin( aAlignment, "tableHeaders" );
+				WriteLine( linkWithToolTip );
+				WriteTableColumnEnd();
+			}
+			else
+			{
+				WriteTableColumn( aTitle, aAlignment, "tableHeaderSelected" );
+			}
+		}
+
+		private void MakeAddressLink( HeapCell aCell )
+		{
+            string fileName = HeapToHTMLPageHeapCellManager.HeapCellFileName( aCell );
+            string subDir = HeapToHTMLPageHeapCellManager.HeapCellDirectory( aCell, string.Empty, '/' );
+
+            string heapCellDataPageUrl = "./HeapData" + subDir + "/" + fileName + ".html";
+            string heapCellLinkedCellPageUrl = "./HeapLinkInfo" + subDir + "/" + fileName + ".html";
+
+			StringBuilder line = new StringBuilder();
+			line.Append( "<A " );
+			line.Append( "TARGET=\"HeapCellData\" " );
+			line.Append( "HREF=\"" );
+			line.Append( heapCellDataPageUrl );
+			line.Append( "\" " );
+			line.Append( "onClick=\"parent.HeapLinkInfo.location=\'" + heapCellLinkedCellPageUrl + "\'\"" );
+			line.Append( ">" );
+            line.Append( "0x" + fileName );
+			line.Append( "</A>" );
+			Writer.Write( line.ToString() );
+		}
+    	#endregion
+
+		#region Internal constants
+		private const int KHeapDataPreviewLength = 500;
+		#endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		private readonly HeapCellArray iEntries;
+		private readonly TSortType iSortType;
+		private int iCurrentHeapCellIndex = 0;
+		private TState iState;
+		private int iTableBodyRowStyleAlternator = 1;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageHeapCellManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using SymbianUtils;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+
+namespace HeapLib
+{
+	public class HeapToHTMLPageHeapCellManager : AsyncTextWriterBase
+	{
+		#region Constructors & destructor
+		public HeapToHTMLPageHeapCellManager( HeapReconstructor aReconstructor, string aBasePath )
+		{
+			iReconstructor = aReconstructor;
+			iEntries = iReconstructor.Data;
+			iBasePath = aBasePath;
+
+			// Make sure our required directories exist
+			HeapToHTMLConverter.PageDirectoryNameEnsuringPathExists( iBasePath, "HeapData" );
+			HeapToHTMLConverter.PageDirectoryNameEnsuringPathExists( iBasePath, "HeapLinkInfo" );
+		}
+		#endregion
+		
+		#region API
+        public static string HeapCellFileName( HeapCell aCell )
+        {
+            // Basic filename
+            string basicName = aCell.Address.ToString( "x8" );
+            return basicName;
+        }
+
+        public static string HeapCellDirectory( HeapCell aCell, string aStandardSubDir, char aDirectorySeparatorCharacter )
+        {
+            string subDirType = "Free";
+
+            // Work out which subdir to put the file in. Allocated & free cells go in different base directories
+            // We don't put more than KMaxNumberOfFilesPerDirectory (100) files in each directory.
+            if ( aCell.Type == HeapCell.TType.EAllocated )
+            {
+                subDirType = "Allocated";
+            }
+
+            uint rampedIndex = aCell.Index / KMaxNumberOfFilesPerDirectory;
+            string subDirCellIndex = rampedIndex.ToString( "d4" );
+            string combinedSubDir = aStandardSubDir + aDirectorySeparatorCharacter + subDirType + aDirectorySeparatorCharacter + subDirCellIndex;
+            return combinedSubDir;
+        }
+
+        public static string HeapCellFileNameAndPath( HeapCell aCell, string aBasePath, string aStandardSubDir )
+        {
+            string basicName = HeapCellFileName( aCell );
+            string combinedSubDir = HeapCellDirectory( aCell, aStandardSubDir, System.IO.Path.DirectorySeparatorChar );
+            string heapDataFileName = HeapToHTMLConverter.PageFileNameEnsuringPathExists( basicName, aBasePath, combinedSubDir );
+            return heapDataFileName;
+        }
+		#endregion
+
+		#region From AsyncTextWriterBase
+        public override long Size
+		{
+			get
+			{
+				return (long) iEntries.Count;
+			}
+		}
+
+        public override long Position
+		{
+			get
+			{
+				long pos = (long) iCurrentHeapCellIndex;
+				return pos;
+			}
+		}
+
+        public override void ExportData()
+		{
+			HeapCell entry = iEntries[ iCurrentHeapCellIndex++ ];
+
+			// Create heap data writer
+			string heapDataFileName = HeapCellFileNameAndPath( entry, iBasePath, "HeapData" );
+			using( HeapToHTMLPageHeapData writer = new HeapToHTMLPageHeapData( iReconstructor, heapDataFileName, entry ) )
+			{
+				writer.ConstructWriter();
+				writer.ExportData();
+			}
+
+			// Create heap linkced cell writer
+            string heapLinkInfoFileName = HeapCellFileNameAndPath( entry, iBasePath, "HeapLinkInfo" );
+			using( HeapToHTMLPageHeapLinkedCells writer = new HeapToHTMLPageHeapLinkedCells( iReconstructor, heapLinkInfoFileName, entry ) )
+			{
+				writer.ConstructWriter();
+				writer.ExportData();
+			}
+		}
+		#endregion
+
+        #region Internal constants
+        private const uint KMaxNumberOfFilesPerDirectory = 100;
+        #endregion
+
+        #region Data members
+        private readonly HeapReconstructor iReconstructor;
+		private readonly HeapCellArray iEntries;
+		private readonly string iBasePath;
+		private int iCurrentHeapCellIndex = 0;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageHeapData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,315 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Drawing;
+using SymbianUtils;
+using SymbianUtils.RawItems;
+using HeapLib.Cells;
+using HeapLib.Reconstructor;
+
+namespace HeapLib
+{
+	public class HeapToHTMLPageHeapData : AsyncHTMLFileWriter
+	{
+		#region Constructors & destructor
+		public HeapToHTMLPageHeapData( HeapReconstructor aReconstructor, string aFileName, HeapCell aCell )
+			: base( aFileName, TNotUsingThread.ENotUsingThread )
+		{
+			iReconstructor = aReconstructor;
+			iCell = aCell;
+		}
+		#endregion
+		
+		#region API
+		#endregion
+
+		#region Internal state related
+		private void OnStateHeader()
+		{
+			#region Header
+			WriteDocumentBegin();
+			WriteHeadBegin();
+			WriteTitle( "Heap Cell Contents - 0x" + iCell.Address.ToString("x8") );
+			WriteStyleBegin();
+
+				WriteStyleName( "td, tr, li" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: courier, courier new, monospace;" );
+				WriteStyleBody( "font-size: 9pt;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteLine( "a:link { text-decoration: none; color:  #CC0000 }" );
+				WriteLine( "a:visited { text-decoration: none; color:  #CC0000 }" );
+				WriteLine( "a:active { text-decoration: none; color:  #CC0000 }" );
+				WriteLine( "a:hover { text-decoration: underline; color:  #CC0066 }" );
+
+				WriteStyleName( "p" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 10pt;" );
+				WriteStyleBody( "color: #0000AA; font-weight: bold;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".cellDataAsNumeric" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: courier, courier new, monospace;" );
+				WriteStyleBody( "font-size: 9pt;" );
+				WriteStyleBody( "color: #000099;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".cellDataAsString" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: courier, courier new, monospace;" );
+				WriteStyleBody( "font-size: 11pt;" );
+				WriteStyleBody( "color: #009900;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+			WriteStyleEnd();
+
+            WriteLine("<SCRIPT SRC=\"../../" + HeapToHTMLPageJavaScriptManager.JavaScriptHelperFileName + "\"></SCRIPT>");
+
+			WriteHeadEnd();
+		#endregion
+
+			WriteBodyBegin();
+
+			WriteDivisionBegin();
+
+			WriteLine( "<P id=\"PageTop\">Heap Data Viewer</P>" );
+
+			WriteTableBegin();
+			WriteTableRowBegin();
+
+				// Address
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+
+				// Raw byte values	
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+				
+				// Characterised data
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "", TAlignment.EAlignCenter, "tableHeaders" );
+
+			WriteTableRowEnd();
+
+			#region Blank row
+			WriteTableRowBegin();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+			WriteTableRowEnd();
+			#endregion
+		}
+
+		private void OnStateBody()
+		{
+			const int KDWordsPerLine = 4;
+
+			int rawItemsCount = iCell.RawItems.Count;
+			for( int i=0; i<rawItemsCount; i += KDWordsPerLine )
+			{
+                RawItem rawItem = iCell[ i ];
+
+				// Start new row
+				WriteTableRowBegin();
+
+				// Address
+				WriteTableColumnBegin();
+				WriteAnchorWithName( rawItem.Address.ToString("x8") );
+				Writer.Write( "0x" + rawItem.Address.ToString("x8") );
+				WriteTableColumnEnd();
+
+				// Blank spacer
+				WriteTableColumnBegin( TAlignment.EAlignNone, string.Empty, 20 );
+				WriteSpace();
+				WriteTableColumnEnd();
+
+				// Work out how many items on this line
+				int runIndex;
+				int runExtent = i + KDWordsPerLine;
+
+				// First set of columns - original data
+				for( runIndex = i; runIndex < runExtent; runIndex++ )
+				{
+					// Get the item
+					if	( runIndex < rawItemsCount )
+					{
+						rawItem = iCell[ runIndex ];
+
+						// Does the raw item have a linked cell associated with it?
+						if	( rawItem.Tag != null && rawItem.Tag is Relationships.RelationshipInfo )
+						{
+                            Relationships.RelationshipInfo relationshipInfo = (Relationships.RelationshipInfo) rawItem.Tag;
+                            HeapCell associatedCell = relationshipInfo.ToCell;
+
+							string url = "javascript:showMainFormCell(\'" + associatedCell.Address.ToString("x8") + "\')";
+							string windowTarget = "MainWindow";
+							string toolTipTitle = "Link to ";
+							if	( associatedCell.Symbol != null )
+							{
+								toolTipTitle += associatedCell.Symbol.NameWithoutVTablePrefix;
+							}
+							else
+							{
+								toolTipTitle += "Cell";
+							}
+							string toolTipBody = ToolTipBody( associatedCell );
+							string linkText = rawItem.OriginalData.ToString("x8");
+							string linkWithToolTip = HeapToHTMLPageJavaScriptManager.MakeToolTipLink( toolTipTitle, toolTipBody, url, windowTarget, linkText );
+
+							WriteTableColumnBegin( TAlignment.EAlignCenter, "cellDataAsNumeric" );
+							WriteLine( linkWithToolTip );
+							WriteTableColumnEnd();
+						}
+						else
+						{
+							WriteTableColumnHex( rawItem.OriginalData, TAlignment.EAlignCenter, "cellDataAsNumeric" );
+						}
+					}
+					else
+					{
+						WriteTableColumnEmpty();
+						rawItem = null;
+					}
+				}
+
+				// Blank spacer
+				WriteTableColumnBegin( TAlignment.EAlignNone, string.Empty, 20 );
+				WriteSpace();
+				WriteTableColumnEnd();
+
+				// Second set of columns - characterised data
+				for( runIndex = i; runIndex < runExtent; runIndex++ )
+				{
+					// Get the item
+					if	( runIndex < rawItemsCount )
+					{
+						rawItem = iCell[ runIndex ];
+						WriteTableColumn( rawItem.OriginalCharacterisedData, TAlignment.EAlignCenter, "cellDataAsString" );
+					}
+					else
+					{
+						WriteTableColumnEmpty();
+						rawItem = null;
+					}
+				}
+			}
+
+			WriteTableRowEnd();
+		}
+
+		private void OnStateFooter()
+		{
+			WriteTableEnd();
+			WriteDivisionEnd();
+
+			WriteBodyEnd();
+
+			WriteDocumentEnd();
+		}
+		#endregion
+
+		#region Internal methods
+		private static string LinkedHeapCellLayerName( HeapCell aCell )
+		{
+			return "LinkedHeapCell_" + aCell.Address.ToString("x8");
+		}
+
+		private static string ToolTipBody( HeapCell aCell )
+		{
+			StringBuilder ret = new StringBuilder();
+			//
+			ret.Append( "There appears to be a link to the heap cell at address: 0x" + aCell.Address.ToString("x8") + "<BR><BR>" );
+			if	( aCell.Symbol != null )
+			{
+				ret.Append( "The link cell has an associated symbol: " + aCell.Symbol.NameWithoutVTablePrefix );
+			}
+			//
+			return ret.ToString();
+		}
+		#endregion
+
+		#region From AsyncTextWriterBase
+        public override long Size
+		{
+			get
+			{
+				return 1;
+			}
+		}
+
+        public override long Position
+		{
+			get
+			{
+				return 0;
+			}
+		}
+
+        public override void ExportData()
+		{
+			// NB this object is called synchronously, despite its name
+			OnStateHeader();
+			OnStateBody();
+			OnStateFooter();
+		}
+		#endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		private readonly HeapCell iCell;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageHeapLinkedCells.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapLib.Relationships;
+
+namespace HeapLib
+{
+	public class HeapToHTMLPageHeapLinkedCells : AsyncHTMLFileWriter
+	{
+		#region Constructors & destructor
+		public HeapToHTMLPageHeapLinkedCells( HeapReconstructor aReconstructor, string aFileName, HeapCell aCell )
+			: base( aFileName, TNotUsingThread.ENotUsingThread )
+		{
+			iReconstructor = aReconstructor;
+			iCell = aCell;
+		}
+		#endregion
+		
+		#region API
+		#endregion
+
+		#region Internal state related
+		private void OnStateHeader()
+		{
+			#region Header
+			WriteDocumentBegin();
+			WriteHeadBegin();
+			WriteTitle( "Heap Cell Contents - 0x" + iCell.Address.ToString("x8") );
+			WriteStyleBegin();
+
+				WriteStyleName( "td, tr, li" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 9pt;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteLine( "a:link { text-decoration: none; color:  #CC0000 }" );
+				WriteLine( "a:visited { text-decoration: none; color:  #CC0000 }" );
+				WriteLine( "a:active { text-decoration: none; color:  #CC0000 }" );
+				WriteLine( "a:hover { text-decoration: underline; color:  #CC0066 }" );
+
+				WriteStyleName( ".tableBorder" );
+				WriteStyleBodyBegin();
+				WriteStyleBody(	"border-width: 1px;" );
+				WriteStyleBody( "border-style: solid;" );
+				WriteStyleBody(	"border-color: #000000;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableRowTitle" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "background-color: #DDDDDD;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableRowTotal" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "background-color: #EEEEEE;" );
+				WriteStyleBody(	"border-top: #000000 1px solid;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".title" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 10pt;" );
+				WriteStyleBody( "color: #0000AA; font-weight: bold;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".noitems" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 8pt;" );
+				WriteStyleBody( "color: #0000AA;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBodyEnd();
+
+				WriteStyleName( ".tableHeaders" );
+				WriteStyleBodyBegin();
+				WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif;" );
+				WriteStyleBody( "font-size: 12pt;" );
+				WriteStyleBody( "color: #000000; font-weight: bold;" );
+				WriteStyleBody( "white-space: nowrap;" );
+				WriteStyleBody(	"border-bottom: #000000 1px solid;" );
+				WriteStyleBodyEnd();
+
+			WriteStyleEnd();
+
+            WriteLine("<SCRIPT SRC=\"../../" + HeapToHTMLPageJavaScriptManager.JavaScriptHelperFileName + "\"></SCRIPT>");
+
+			WriteHeadEnd();
+		#endregion
+
+			WriteBodyBegin();
+
+			WriteDivisionBegin();
+
+			WriteLine( "<P id=\"PageTop\" class=\"title\">Cell Associations</P>" );
+
+            if ( iCell.RelationshipManager.EmbeddedReferencesTo.Count > 0 )
+			{
+				Writer.WriteLine( "<TABLE class=\"tableBorder\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">" );
+				Writer.WriteLine( "<TR class=\"tableRowTitle\">" );
+
+				WriteTableColumn( "Address", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "Length", TAlignment.EAlignCenter, "tableHeaders" );
+				WriteTableColumn( "Symbol", TAlignment.EAlignCenter, "tableHeaders" );
+
+				WriteTableRowEnd();
+
+				#region Blank row
+				WriteTableRowBegin();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableRowEnd();
+				#endregion
+			}
+			else
+			{
+				WriteLine( "<P class=\"noitems\">No linked cells</P>" );
+			}
+		}
+
+		private void OnStateBody()
+		{
+            RelationshipCollection linkedCells = iCell.RelationshipManager.EmbeddedReferencesTo;
+            if ( linkedCells.Count > 0 )
+			{
+                foreach( RelationshipInfo info in linkedCells )
+                {
+                    HeapCell linkedCell = info.ToCell;
+
+					// Start new row
+					WriteTableRowBegin();
+
+					// Address
+					WriteTableColumnHexAddress( linkedCell.Address, TAlignment.EAlignLeft );
+
+					// Length
+					WriteTableColumn( linkedCell.PayloadLength, TAlignment.EAlignRight );
+
+					// Symbol
+					string linkText = "[Unknown linked cell]";
+					if	( linkedCell.Symbol != null )
+					{
+						linkText = linkedCell.Symbol.NameWithoutVTablePrefix;
+					}
+
+					string url = "javascript:showMainFormCell(\'" + linkedCell.Address.ToString("x8") + "\')";
+					string windowTarget = "MainWindow";
+					WriteTableColumnBegin( TAlignment.EAlignLeft, string.Empty );
+					WriteAnchorWithTarget( windowTarget, url, linkText );
+					WriteTableColumnEnd();
+
+                    WriteTableRowEnd();
+				}
+
+				#region Blank row
+				WriteTableRowBegin();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableColumnEmpty();
+				WriteTableRowEnd();
+				#endregion
+
+				#region Total
+				WriteTableRowBegin();
+				WriteTableColumn( "Total:", "tableRowTotal" );
+				WriteTableColumn( ( iCell.PayloadLengthIncludingLinkedCells - iCell.PayloadLength ).ToString( "" ), TAlignment.EAlignRight, "tableRowTotal" );
+				WriteTableColumn( "&nbsp;", "tableRowTotal" );
+				WriteTableRowEnd();
+				#endregion
+			}
+		}
+
+		private void OnStateFooter()
+		{
+            if ( iCell.RelationshipManager.EmbeddedReferencesTo.Count > 0 )
+            {
+                WriteTableEnd();
+			}
+
+			WriteDivisionEnd();
+			WriteBodyEnd();
+			WriteDocumentEnd();
+		}
+		#endregion
+
+		#region From AsyncTextWriterBase
+        public override long Size
+		{
+			get
+			{
+				return 1;
+			}
+		}
+
+        public override long Position
+		{
+			get
+			{
+				return 0;
+			}
+		}
+
+        public override void ExportData()
+		{
+			// NB this object is called synchronously, despite its name
+			OnStateHeader();
+			OnStateBody();
+			OnStateFooter();
+		}
+		#endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		private readonly HeapCell iCell;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageIndex.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using SymbianUtils;
+using HeapLib.Reconstructor;
+
+namespace HeapLib
+{
+	public class HeapToHTMLPageIndex : AsyncHTMLFileWriter
+	{
+		#region Constructors & destructor
+		public HeapToHTMLPageIndex( HeapReconstructor aReconstructor, string aFileName )
+			:	base( aFileName )
+		{
+			iReconstructor = aReconstructor;
+		}
+		#endregion
+		
+		#region API
+		#endregion
+
+		#region From AsyncTextWriterBase
+        public override long Size
+		{
+			get
+			{
+				// So small that we write the entire file in one go
+				return 1;
+			}
+		}
+
+        public override long Position
+		{
+			get
+			{
+				// We're immediately finished once we've written the data
+				// once
+				return iPosition;
+			}
+		}
+
+        public override void ExportData()
+		{
+			WriteDocumentBegin();
+				WriteHeadBegin();
+					WriteTitle( "Heap Viewer" );
+					WriteStyleBegin();
+						WriteStyleName( "a:link" );
+							WriteStyleBodyBegin();
+							WriteStyleBody( "font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000; text-decoration: none;" );
+							WriteStyleBodyEnd();
+					WriteStyleEnd();
+				WriteHeadEnd();
+
+				Writer.WriteLine( "<FRAMESET ROWS=\"66%,33%\">" );
+				Writer.WriteLine( "<FRAME SRC=\"EntireHeapListing_ByAddress.html\" name=\"MainWindow\">" );
+				Writer.WriteLine( "<FRAMESET COLS=\"60%,40%\">" );
+				Writer.WriteLine( "<FRAME SCROLLING=\"auto\" name=\"HeapCellData\">" );
+				Writer.WriteLine( "<FRAME SCROLLING=\"auto\" name=\"HeapLinkInfo\">" );
+				Writer.WriteLine( "</FRAMESET>" );
+				Writer.WriteLine( "</FRAMESET>" );
+
+			WriteDocumentEnd();
+
+			iPosition = 1; // Finished
+		}
+		#endregion
+
+		#region Internal methods
+		#endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		private long iPosition = 0;
+		#endregion
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_HTML/HeapToHTMLPageJavaScriptManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using SymbianUtils;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+
+namespace HeapLib
+{
+	public class HeapToHTMLPageJavaScriptManager : AsyncTextWriterBase
+	{
+		#region Constructors & destructor
+		public HeapToHTMLPageJavaScriptManager( HeapReconstructor aReconstructor, string aBasePath )
+		{
+			iReconstructor = aReconstructor;
+			iEntries = iReconstructor.Data;
+			iBasePath = aBasePath;
+		}
+		#endregion
+		
+		#region API
+		public static string JavaScriptHelperFileName
+		{
+			get { return "HeapDataJavaScriptLib.js"; }
+		}
+
+		public static string MakeToolTipLink( string aToolTipTitle, string aToolTipBody, string aUrl, string aWindowTarget, string aLinkText )
+		{
+			string javaScript = JavaScript( aToolTipTitle, aToolTipBody );
+			
+			StringBuilder ret = new StringBuilder();
+			//
+			ret.Append( "<a href=\"" + aUrl + "\" " );
+			if	( aWindowTarget != string.Empty )
+			{
+				ret.Append( "target=\"" + aWindowTarget + "\" " );
+			}
+			ret.Append( javaScript );
+			ret.Append( ">" );
+			ret.Append( aLinkText );
+			ret.Append( "</a>" );
+			//
+			return ret.ToString();
+		}
+
+		public static string MakeToolTipDiv( string aToolTipTitle, string aToolTipBody, string aDivText )
+		{
+			return MakeToolTipDiv( aToolTipTitle, aToolTipBody, aDivText, -1 );
+		}
+
+		public static string MakeToolTipDiv( string aToolTipTitle, string aToolTipBody, string aDivText, int aWidth )
+		{
+			string javaScript = JavaScript( aToolTipTitle, aToolTipBody, aWidth);
+			
+			StringBuilder ret = new StringBuilder();
+			//
+			ret.Append( "<div " + javaScript + ">" );
+			ret.Append( aDivText );
+			ret.Append( "</div>" );
+			//
+			return ret.ToString();
+		}
+		#endregion
+
+		#region Internal methods
+		private static string JavaScript( string aTooltipTitle, string aToolTipBody )
+		{
+			return JavaScript( aTooltipTitle, aToolTipBody, -1 );
+		}
+
+		private static string JavaScript( string aTooltipTitle, string aToolTipBody, int aWidth )
+		{
+			string onMouseOver = " onmouseover=\"showInfo(\'" + aTooltipTitle + "\', \'" + aToolTipBody + "\'";
+			if	( aWidth > 0 )
+			{
+				onMouseOver += ", \'" + aWidth.ToString() + "\'";
+			}
+			onMouseOver += ")\"";
+			//
+			string onMouseOut = " onmouseout=\"hideInfo()\"";
+			string onFocus = " onfocus=\"this.blur()\"";
+			string javaScript = onMouseOver + onMouseOut + onFocus;
+			//
+			return javaScript;
+		}
+		#endregion
+
+		#region From AsyncTextWriterBase
+        public override long Size
+		{
+			get
+			{
+				return 2;
+			}
+		}
+
+        public override long Position
+		{
+			get
+			{
+				return iPosition;
+			}
+		}
+
+        public override void ExportData()
+		{
+			string javaScriptLibSourceFileName = Path.Combine( System.Windows.Forms.Application.StartupPath, JavaScriptHelperFileName );
+			if	( File.Exists( javaScriptLibSourceFileName ) == false )
+			{
+				throw new FileNotFoundException( "Cannot locate Heap Data java script library", javaScriptLibSourceFileName );
+			}
+
+			string javaScriptLibFileNameHeapData = Path.Combine( HeapToHTMLConverter.PageDirectoryNameEnsuringPathExists( iBasePath, "HeapData" ), JavaScriptHelperFileName );
+			File.Copy( javaScriptLibSourceFileName, javaScriptLibFileNameHeapData, true );
+			iPosition++;
+
+			string javaScriptLibFileNameHeapLinkInfo = Path.Combine( HeapToHTMLConverter.PageDirectoryNameEnsuringPathExists( iBasePath, "HeapLinkInfo" ), JavaScriptHelperFileName );
+			File.Copy( javaScriptLibSourceFileName, javaScriptLibFileNameHeapLinkInfo, true );
+			iPosition++;
+		}
+		#endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		private readonly HeapCellArray iEntries;
+		private readonly string iBasePath;
+		private long iPosition = 0;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Output_Text/HeapToFileConverter.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using HeapLib.Array;
+using HeapLib.Cells;
+using HeapLib.Reconstructor;
+
+namespace HeapLib
+{
+	public class HeapToFileConverter
+	{
+		public HeapToFileConverter( bool aShowOnlySymbolicMatches, HeapReconstructor aReconstructor )
+		{
+			iShowOnlySymbolicMatches = aShowOnlySymbolicMatches;
+			iReconstructor = aReconstructor;
+		}
+		
+		public void Export( string aFileName )
+		{
+			using( StreamWriter writer = new StreamWriter( aFileName ) )
+			{
+				DoWriteHeapToFile( writer );
+				writer.Flush();
+			}
+		}
+
+		private void DoWriteHeapToFile( StreamWriter aWriter )
+		{
+			aWriter.WriteLine( "Cell\t\tCounter\t\tLength\t\tSymbol" );
+			aWriter.WriteLine( "" );
+			//
+			HeapCellArray heapItems = iReconstructor.Data;
+			for (int r = 0; r < heapItems.Count; r++)
+			{
+				HeapCell entry = (HeapCell) heapItems[r];
+				//
+				if	( iShowOnlySymbolicMatches == false || (iShowOnlySymbolicMatches == true && entry.Symbol != null) )
+				{
+					StringBuilder line = new StringBuilder();
+					//
+					line.Append( entry.Address.ToString("x8") );
+					line.Append( "\t" );
+					line.Append( entry.AllocationNumber.ToString("d8") );
+					line.Append( "\t" );
+					line.Append( entry.Length.ToString("x8") );
+					line.Append( "\t" );
+					if	( entry.Symbol != null )
+					{
+						line.Append( entry.Symbol.Name );
+					}
+					//
+					aWriter.WriteLine( line.ToString() );
+				}
+			}
+		}	
+
+		#region Data members
+		private readonly bool iShowOnlySymbolicMatches;
+		private readonly HeapReconstructor iReconstructor;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/DataSourceAnalyser.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,283 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources.Analyser.Readers;
+using HeapLib.Reconstructor.DataSources.Analyser.Extractor;
+using HeapLib.Reconstructor.DataSources.Analyser.Interpreter;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser
+{
+    public class DataSourceAnalyser
+    {
+        #region Events
+        public enum TEvent
+        {
+            EReadingStarted = 0,
+            EReadingProgress,
+            EReadingComplete
+        }
+
+        public delegate void Observer( TEvent aEvent, DataSourceAnalyser aSender );
+        public event Observer iObserver;
+
+        public delegate void ExceptionHandler( Exception aException, DataSourceAnalyser aSender );
+        public event ExceptionHandler iExceptionHandler;
+        #endregion
+
+        #region Constructors & destructor
+        public DataSourceAnalyser( string[] aLines )
+        {
+            iReader = new ReaderLines( this, aLines );
+            iReader.iObserver += new AsyncReaderBase.Observer( Reader_Observer );
+            iReader.iExceptionHandler += new AsyncReaderBase.ExceptionHandler( Reader_ExceptionHandler );
+        }
+
+        public DataSourceAnalyser( string aFileName )
+        {
+            iReader = new ReaderFile( this, aFileName );
+            iReader.iObserver += new AsyncReaderBase.Observer( Reader_Observer );
+            iReader.iExceptionHandler += new AsyncReaderBase.ExceptionHandler( Reader_ExceptionHandler );
+        }
+        #endregion
+
+        #region API
+        public void Analyse()
+        {
+            if ( iReader is ReaderFile )
+            {
+                ReaderFile reader = (ReaderFile) iReader;
+                reader.StartRead();
+            }
+            else if ( iReader is ReaderLines )
+            {
+                ReaderLines reader = (ReaderLines) iReader;
+                reader.StartRead();
+            }
+        }
+        #endregion
+
+        #region Properties
+        public bool IsReady
+        {
+            get { return iReader.IsReady; }
+        }
+
+        public int Progress
+        {
+            get { return iReader.Progress; }
+        }
+
+        public DataSourceCollection DataSources
+        {
+            get { return iDataSources; }
+        }
+        #endregion
+
+        #region Reader call back method
+        internal void HandleFilteredLine( string aLine, long aLineNumber )
+        {
+            // The four types of data we allow.
+            //
+            // 1) Text data from a trace file
+            //    [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HEAP INFO FOR THREAD 'EComServer::!ecomserver'
+            //
+            // 2) Text data from a MemSpy heap dump file
+            //    HEAP INFO FOR THREAD 'ecomserver::!ecomserver'
+            //
+            // 3) Binary data from a trace file:
+            //    [14:39:24.344] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:[BinHeap:00000131]<BinHeapData:00000131:00000130:000000000001346e>
+            //    [14:39:24.344] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:[BinHeap:00000131]00000000: be d0 be d0 ba da ba da 00 00 00 d0 01 00 00 00 ................
+            //    [14:39:24.344] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:[BinHeap:00000131]00000010: 6e 34 01 00 82 00 00 00 83 00 00 00 01 00 00 00 n4..............
+            //
+            // 4) Binary data from a MemSpy heap dump file
+            //    <BinHeapData:00000114:00000113:0000000000001234>
+            //    000ae8cc: 00 00 00 00 00 00 00 00 9d 2a 17 00 24 00 00 00
+
+            // First, try running the line past any existing extractors
+            bool handled = false;
+            foreach ( Extractor.Extractor ext in iActiveExtractors )
+            {
+                if ( ext.ExtractFrom( aLine, false ) )
+                {
+                    handled = true;
+                    break;
+                }
+            }
+            //
+            if ( !handled )
+            {
+                // Try to create a new extractor that can handle this type of line
+                Extractor.Extractor extractor = iExtractorFactory.FindSuitableExtractor( aLine );
+                if ( extractor != null )
+                {
+                    InterpreterBase interpreter = iInterpreterFactory.FindSuitableInterpreter( extractor );
+
+                    if ( interpreter != null )
+                    {
+                        // Link up extractor and interpreter with a new data source
+                        string dataSourceFileName = GetSourceFileName();
+                        DataSource dataSource = new DataSource( dataSourceFileName, aLineNumber );
+                        interpreter.DataSource = dataSource;
+                        extractor.Interpreter = interpreter;
+
+                        // We should also initialise the interpreter now that we've
+                        // prepared the data source
+                        interpreter.PrepareToStart( extractor );
+
+                        // We must fire the extractor
+                        extractor.ExtractFrom( aLine, true );
+
+                        // Save the extractor so that we can ask it to handle future lines
+                        AddExtractor( extractor );
+
+                        // Save the data source
+                        iDataSources.Add( dataSource );
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void ReadingComplete()
+        {
+            RemoveEmptySources();
+
+            // Check if the sources that are left were all completed, and if not
+            // update their error flags.
+            foreach ( DataSource source in iDataSources )
+            {
+                Elements.MetaData metaData = source.MetaData;
+                if ( metaData.IsDataComplete == false )
+                {
+                    source.AddError( DataSource.TErrorTypes.EErrorTypeDataMissing );
+                }
+            }
+        }
+
+        private string GetSourceFileName()
+        {
+            string fileName = "RawHeapData.txt";
+            if ( iReader is ReaderFile )
+            {
+                fileName = ( (ReaderFile) iReader ).FileName;
+            }
+            return fileName;
+        }
+
+        private void RemoveEmptySources()
+        {
+            iDataSources.RemoveEmptySources();
+        }
+
+        private void AddExtractor( Extractor.Extractor aExtractor )
+        {
+            // Check whether we already have an extractor for this thread.
+            string threadName = aExtractor.Interpreter.DataSource.ThreadName;
+            
+            // If an entry with the same thread name already exists, then we
+            // remove it, and replace it with a new entry
+            Extractor.Extractor existingEntry = ExtractorByThread( threadName );
+            if ( existingEntry != null )
+            {
+                iActiveExtractors.Remove( existingEntry );
+            }
+
+            // Save new extractor for the thread
+            iActiveExtractors.Add( aExtractor );
+        }
+
+        private Extractor.Extractor ExtractorByThread( string aName )
+        {
+            Predicate<Extractor.Extractor> findByNamePredicate = delegate( Extractor.Extractor aExtractor )
+            {
+                string entryName = aExtractor.Interpreter.DataSource.ThreadName;
+                return ( entryName == aName );
+            };
+
+            Extractor.Extractor ret = iActiveExtractors.Find( findByNamePredicate );
+            return ret;
+        }
+        #endregion
+
+        #region From AsyncReaderBase
+        void Reader_ExceptionHandler( Exception aException, AsyncReaderBase aSender )
+        {
+            if ( iExceptionHandler != null )
+            {
+                iExceptionHandler( aException, this );
+            }
+        }
+
+        void Reader_Observer( AsyncReaderBase.TEvent aEvent, AsyncReaderBase aSender )
+        {
+            if ( iObserver != null )
+            {
+                switch ( aEvent )
+                {
+                case AsyncReaderBase.TEvent.EReadingStarted:
+                    iObserver( TEvent.EReadingStarted, this );
+                    break;
+                case AsyncReaderBase.TEvent.EReadingProgress:
+                    iObserver( TEvent.EReadingProgress, this );
+                    break;
+                case AsyncReaderBase.TEvent.EReadingComplete:
+                    ReadingComplete();
+                    iObserver( TEvent.EReadingComplete, this );
+                    break;
+                default:
+                    break;
+                }
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly AsyncTextReader iReader;
+        private DataSourceCollection iDataSources = new DataSourceCollection();
+        private ExtractorFactory iExtractorFactory = new ExtractorFactory();
+        private InterpreterFactory iInterpreterFactory = new InterpreterFactory();
+        private List<Extractor.Extractor> iActiveExtractors = new List<HeapLib.Reconstructor.DataSources.Analyser.Extractor.Extractor>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/Base/Extractor.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+using HeapLib.Reconstructor.DataSources.Analyser.Interpreter;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Extractor
+{
+    // <summary>
+    // The job of the extractor is just to remove any prefix associated
+    // with a given line. For example, the text-based file formats contain
+    // prefixes which allow multiple heap dumps to appear within one 
+    // trace file. We must partition these heap dumps into individual data
+    // sources, hence we must be able to identify those prefixes and use
+    // them during the partitioning operation.
+    // 
+    // This is the sole purpose for this class.
+    // </summary>
+    internal abstract class Extractor
+    {
+        #region Constructors & destrutor
+        protected Extractor()
+        {
+        }
+        #endregion
+
+        #region API
+        public abstract bool CanExtractFrom( string aLine );
+
+        public abstract bool ExtractFrom( string aLine, bool aForceExtractionOfThreadIdentifier );
+        #endregion
+
+        #region Properties
+        public abstract string Hash { get; }
+
+        public string PrimaryLine
+        {
+            get { return iPrimaryLine; }
+            protected set { iPrimaryLine = value; }
+        }
+
+        public InterpreterBase Interpreter
+        {
+            get { return iInterpreter; }
+            set { iInterpreter = value; }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Data members
+        private string iPrimaryLine = string.Empty;
+        private InterpreterBase iInterpreter = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/ExtractedData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Extractor
+{
+    internal sealed class ExtractedData
+    {
+        #region Enumerations
+        public enum TType
+        {
+            EText = 0,
+            EBinaryData
+        }
+        #endregion
+
+        #region Static constructor
+        public static ExtractedData NewText( string aText, string aOriginalLine )
+        {
+            ExtractedData self = new ExtractedData( aText, aOriginalLine );
+            return self;
+        }
+
+        public static ExtractedData NewBinaryData( byte[] aBinaryData, string aOriginalLine )
+        {
+            ExtractedData self = new ExtractedData( aBinaryData, aOriginalLine );
+            return self;
+        }
+        #endregion
+
+        #region Constructors & destructor
+        private ExtractedData( string aOriginalLine )
+        {
+            iOriginalLine = aOriginalLine;
+        }
+
+        private ExtractedData( string aText, string aOriginalLine )
+            : this( aOriginalLine ) 
+        {
+            iType = TType.EText;
+            iText = aText;
+        }
+
+        private ExtractedData( byte[] aBinaryData, string aOriginalLine )
+            : this( aOriginalLine )
+        {
+            iType = TType.EBinaryData;
+            iBinaryData = aBinaryData;
+        }
+        #endregion
+
+        #region Properties
+        public TType Type
+        {
+            get { return iType; }
+        }
+
+        public string Text
+        {
+            get
+            {
+                if ( iType != TType.EText )
+                {
+                    throw new ArgumentException();
+                }
+
+                return iText;
+            }
+        }
+
+        public byte[] BinaryData
+        {
+            get
+            {
+                if ( iType != TType.EBinaryData )
+                {
+                    throw new ArgumentException();
+                }
+
+                return iBinaryData;
+            }
+        }
+
+        public string OriginalLine
+        {
+            get
+            {
+                return iOriginalLine;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly TType iType;
+        private readonly string iOriginalLine;
+        private string iText = null;
+        private byte[] iBinaryData = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/ExtractorFactory.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Extractor
+{
+    internal sealed class ExtractorFactory
+    {
+        #region Constructors & destrutor
+        public ExtractorFactory()
+        {
+            Type extractorType = typeof( Extractor );
+            Type[] types = Assembly.GetExecutingAssembly().GetTypes();
+            foreach ( Type t in types )
+            {
+                if ( t.IsClass && extractorType.IsAssignableFrom( t ) && !t.IsAbstract )
+                {
+                    iExtractorTypes.Add( t );
+                }
+            }
+        }
+        #endregion
+
+        #region API
+        public Extractor FindSuitableExtractor( string aLine )
+        {
+            Extractor ret = null;
+            //
+            foreach ( Type extractorType in iExtractorTypes )
+            {
+                Extractor ext = CreateExtractor( extractorType );
+                try
+                {
+                    bool canExtract = ext.CanExtractFrom( aLine );
+                    if ( canExtract )
+                    {
+                        System.Diagnostics.Debug.Assert( ext.PrimaryLine != string.Empty );
+                        System.Diagnostics.Debug.Assert( ext.Hash != string.Empty );
+                        ret = ext;
+                        break;
+                    }
+                }
+                catch ( Exception )
+                {
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        private Extractor CreateExtractor( Type aType )
+        {
+            object[] parameters = new object[] { };
+            Extractor ret = (Extractor) Activator.CreateInstance( aType, parameters );
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        private List<Type> iExtractorTypes = new List<Type>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/Implementations/ExtractorBinary.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Extractor
+{
+    internal sealed class ExtractorBinary//: ExtractorBase
+    {
+        /*
+        #region Constructors & destructor
+        public ExtractorBinary()
+        {
+        }
+        #endregion
+
+        #region API
+        public override ExtractedData ProcessLine( string aLine )
+        {
+            // [14:39:24.344] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:[BinHeap:00000131]<BinHeapData:00000131:00000130:000000000001346e>
+            // [14:39:24.344] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:[BinHeap:00000131]00000000: be d0 be d0 ba da ba da 00 00 00 d0 01 00 00 00 ................
+            // [14:39:24.344] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:[BinHeap:00000131]00000010: 6e 34 01 00 82 00 00 00 83 00 00 00 01 00 00 00 n4..............
+            // [14:39:24.344] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:[BinHeap:00000131]00000020: 2c 00 00 00 61 6b 6e 73 6b 69 6e 73 72 76 2e 65 ,...aknskinsrv.e
+            //
+            // or
+            //
+            // <BinHeapData:00000131:00000130:000000000001346e>
+            // 00000000: be d0 be d0 ba da ba da 00 00 00 d0 01 00 00 00 ................
+            // 00000010: 6e 34 01 00 82 00 00 00 83 00 00 00 01 00 00 00 n4..............
+            // 00000020: 2c 00 00 00 61 6b 6e 73 6b 69 6e 73 72 76 2e 65 ,...aknskinsrv.e
+            string line = aLine;
+            ExtractedData ret = new ExtractedData();
+
+            // Check if it's a "[BinHeap:" line...
+            bool isTaggedWithBinaryPrefix = KRegExHeapInfoTraceBinaryPrefix.IsMatch( line );
+            if ( isTaggedWithBinaryPrefix )
+            {
+                Match m = KRegExHeapInfoTraceBinaryPrefix.Match( line );
+                Group gpThreadId = m.Groups[ "TID" ];
+                Group gpLine = m.Groups[ "LINE" ];
+
+                ret.ThreadId = ThreadIdFromText( gpThreadId.Value );
+
+                // Continue with rest of data...
+                line = gpLine.Value;
+            }
+
+            // Check if it is a "<BinHeapData" line...
+            bool accept = KRegExHeapInfoBinaryTag.IsMatch( aLine );
+            if ( accept )
+            {
+                Match m = KRegExHeapInfoBinaryTag.Match( aLine );
+                Group gpThreadId = m.Groups[ "TID" ];
+                Group gpProcessId = m.Groups[ "PID" ];
+                Group gpLength = m.Groups[ "LENGTH" ];
+
+                // Get the thread id.
+                uint tid = ThreadIdFromText( gpThreadId.Value );
+                System.Diagnostics.Debug.Assert( ret.ThreadId == 0 || ret.ThreadId == tid );
+                ret.ThreadId = tid;
+            }
+            else
+            {
+                // If we still didn't match, then it might be a MemSpy log file, in which case it'll just 
+                // contain address lines
+                accept = KRegExHeapInfoAddress.IsMatch( aLine );
+                if ( accept )
+                {
+                    Match m = KRegExHeapInfoAddress.Match( aLine );
+                    Group gpAddress = m.Groups[ "ADDRESS" ];
+                    Group gpLine = m.Groups[ "LINE" ];
+
+                    ret.Address = AddressFromText( gpAddress.Value );
+                    ret.Payload = gpLine.Value;
+                }
+            }
+
+            // Our hash is the thread id.
+            ret.Hash = ret.ThreadId.ToString( "x8" );
+
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        private static uint ThreadIdFromText( string aText )
+        {
+            uint ret = SymbianUtils.PrefixParser.ReadUint( ref aText );
+            return ret;
+        }
+
+        private static uint AddressFromText( string aText )
+        {
+            uint ret = SymbianUtils.PrefixParser.ReadUint( ref aText );
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private const string KMemSpyBinaryHeapDumpTrace = "[BinHeap:";
+        private const string KMemSpyBinaryHeapDumpLog = "<BinHeapData:";
+        #endregion
+
+        #region Internal regular expressions
+        private static readonly Regex KRegExHeapInfoBinaryTag = new Regex( @"<(?<TYPE>\x2F?)BinHeapData\x3A(?<TID>[a-fA-F0-9]{8})\x3A(?<PID>[a-fA-F0-9]{8})\x3A(?<LENGTH>[a-fA-F0-9]{16})>", RegexOptions.Singleline | RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.IgnoreCase );
+        private static readonly Regex KRegExHeapInfoAddress = new Regex( @"(?<ADDRESS>[a-fA-F0-9]{8})\x5d(?<LINE>.+)", RegexOptions.Singleline | RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.IgnoreCase );
+        private static readonly Regex KRegExHeapInfoTraceBinaryPrefix = new Regex( @"^\x5bBinHeap\x3a(?<TID>[a-fA-F0-9]{8})\x5d(?<LINE>.+)", RegexOptions.Singleline | RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.IgnoreCase );
+        #endregion
+
+        #region Data members
+        #endregion
+         */
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Extractor/Implementations/ExtractorText.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,295 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#define SUPPORT_OLD_MEMSPY_KERNEL_HEAP_DUMPS
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources.Analyser.Interpreter;
+using SymbianUtils;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Extractor.Implementations
+{
+    internal sealed class ExtractorText : Extractor
+    {
+        #region Constructors & destructor
+        public ExtractorText()
+        {
+        }
+        #endregion
+
+        #region API
+        public override bool CanExtractFrom( string aLine )
+        {
+            // CASE 1: Original file format, logging via trace
+            // 
+            //      HeapData - EComServer::!ecomserver - HEAP INFO FOR THREAD 'EComServer::!ecomserver'
+            //      HeapData - EComServer::!ecomserver - ==============================================
+            //      HeapData - EComServer::!ecomserver - HeapInfo - heapBaseAddress:     0x00700074
+            //      HeapData - EComServer::!ecomserver - HeapInfo - heapSize:                745352
+            //      HeapData - EComServer::!ecomserver - HeapInfo - heapChunkSize:           745472
+            //      ...
+            //      HeapData - EComServer::!ecomserver - 00700084: 00 00 00 00 03 03 03 03 03 03 03 03 03 03 03 03 ................
+            //      HeapData - EComServer::!ecomserver - 00700094: 03 03 03 03 03 03 03 03 28 00 00 00 ec 47 28 80 ........(....G(.
+            //      HeapData - EComServer::!ecomserver - 007000a4: d8 0c 70 00 58 0d 70 00 f8 0c 70 00 03 03 03 03 ..p.X.p...p.....
+            //      HeapData - EComServer::!ecomserver - 007000b4: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ................
+            //      HeapData - EComServer::!ecomserver - 007000c4: 48 00 00 00 e8 2b 30 80 00 2c 30 80 ec 02 70 00 H....+0..,0...p.
+            //
+            // CASE 2: Original file format, logging to file
+            //
+            //      HEAP INFO FOR THREAD 'ecomserver::!ecomserver'
+            //      ==============================================
+            //      HeapInfo - heapBaseAddress:     0x0f8c0074
+            //      HeapInfo - heapSize:                262028
+            //
+            // CASE 3: Original file format, logging to file - kernel - the thread name is omitted!
+            //
+            //      HeapInfo - heapBaseAddress:     0xc809b074
+            //      HeapInfo - heapSize:               3374984
+            //      HeapInfo - heapMinSize:             720892
+            //      HeapInfo - heapMaxSize:           17408000
+            //      HeapInfo - heapFreeCellAddress: 0xc809b04c
+            //      HeapInfo - heapFreeCellLength:           0
+            //      HeapInfo - heapMinCellSize:              40
+            //      HeapInfo - heapUsingDebugAlloc:           0
+            //      HeapInfo - chunkName:              ekern.exe[100041af]0001::SvHeap
+            //      HeapInfo - heapCellAllocCount:       15216
+            //      HeapInfo - heapAllocSpace:         3171512
+            //
+            // CASE 4: New file format, still text, logging via trace
+            //
+            //      HeapData - ApsExe::AppArcServerThread - HEAP INFO FOR THREAD 'APSEXE::APPARCSERVERTHREAD'  
+            //      HeapData - ApsExe::AppArcServerThread - =================================================  
+            //      HeapData - ApsExe::AppArcServerThread -                                                     
+            //      HeapData - ApsExe::AppArcServerThread - Meta Data                                          
+            //      HeapData - ApsExe::AppArcServerThread - =========                                          
+            //      HeapData - ApsExe::AppArcServerThread - Type:                                               Symbian OS RHeap
+            //      HeapData - ApsExe::AppArcServerThread - Chunk Name:                                         ApsExe.exe[10003a3f]0001::AppArcServerThread::$HEAP
+            //      HeapData - ApsExe::AppArcServerThread - Chunk Size:                                         319488
+            //      HeapData - ApsExe::AppArcServerThread - Chunk Base Address:                                 0x00600000
+            //      HeapData - ApsExe::AppArcServerThread - Debug Allocator:                                    0
+            //      
+
+            // First step is to identify the prefix. We do this by looking for the common line which remains
+            // unchanged in all text file formats, and that is the "HEAP INFO FOR THREAD" item.
+            //
+            // If the data included tracing prefixes (e.g. Musti), these will already have been removed.
+            bool ret = false;
+
+            string line = aLine;
+
+#if SUPPORT_OLD_MEMSPY_KERNEL_HEAP_DUMPS
+            if ( line.Contains( "HeapInfo - heapBaseAddress:     0xc" ) )
+            {
+                // This is a work around for a problem with an old version of MemSpy in which
+                // the kernel thread name was not included in the heap data listing. This
+                // results in Heap Analyser discarding the thread entirely.
+                //
+                // Spoof the line
+                int startPos = line.IndexOf( "HeapInfo - heapBaseAddress:     0xc" );
+                line = line.Substring( 0, startPos ) + "HEAP INFO FOR THREAD \'ekern.exe[100041af]0001::Supervisor\'  ";
+            }
+#endif
+
+            Match heapInfoForThreadMatch = KHeapInfoInitialRegEx.Match( line );
+            if ( heapInfoForThreadMatch.Success )
+            {
+                // Work out if there is a prefix prior to the HEAP INFO element...
+                int pos = heapInfoForThreadMatch.Index;
+                if ( pos == 0 )
+                {
+                    // There's no prefix
+                }
+                else
+                {
+                    // There is some kind of standard prefix
+                    iPrefix = line.Substring( 0, pos );
+
+                    // Check if there is the "HeapData -" prefix also. If there is we may need to strip off a musti timestamp:
+                    //
+                    // E.g.:
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600a74: 00 00 00 00 20 00 00 00 04 00 00 00 57 4c 29 80 ............WL).
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600a84: 00 00 00 00 d8 11 00 00 03 03 03 03 03 03 03 03 ................
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600a94: 28 00 00 00 64 f9 52 80 00 24 60 00 50 00 00 10 (...d.R..$`.P...
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600aa4: 69 3c 00 10 d6 72 20 10 00 00 00 00 01 00 00 00 i<...r..........
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600ab4: 38 21 60 00 00 00 00 00 40 00 00 00 c4 4c 2c 80 8!`.....@....L,.
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600ac4: 38 00 00 00 20 00 00 00 40 00 00 00 28 43 60 00 8.......@...(C`.
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600ad4: 28 00 00 00 a4 1f 60 00 14 00 bf 00 c1 00 cb 00 (.....`.........
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600ae4: 10 4e 40 00 ad 2f 37 80 a8 1f 60 00 03 03 03 03 .N@../7...`.....
+                    // 10:54:29.672 HeapData - !MsvServer::!MsvServer - 00600af4: 03 03 03 03 03 03 03 03 98 04 00 00 94 f6 52 80 ..............R.
+                    if ( iPrefix.Contains( KHeapDataPrefix ) )
+                    {
+                        int pos2 = iPrefix.IndexOf( KHeapDataPrefix );
+                        iPrefix = iPrefix.Substring( pos2 );
+                    }
+                }
+
+                // Either way, we need the thread name as we use this
+                // as the identifier for the data source, i.e. the hash
+                iThreadName = heapInfoForThreadMatch.Groups[ "ThreadName" ].Value;
+                
+                // Save data after the prefix
+                base.PrimaryLine = line.Substring( heapInfoForThreadMatch.Index );
+
+                ret = true;
+            }
+
+            return ret;
+        }
+
+        public override bool ExtractFrom( string aLine, bool aForceExtractionOfThreadIdentifier )
+        {
+            // First pass identification stage
+            string line = aLine;
+            bool handled = ( iPrefix.Length == 0 );
+            if ( !handled )
+            {
+                // Check for prefix match
+                handled = aLine.Contains( iPrefix );
+                if ( handled )
+                {
+                    // Check that it's not the start of a new data set
+                    if ( !aForceExtractionOfThreadIdentifier && aLine.Contains( KHeapDataDataSetStartMarker ) ) // "HEAP INFO FOR THREAD"
+                    {
+                        handled = false;
+                    }
+                    else
+                    {
+                        int pos = aLine.IndexOf( iPrefix );
+                        line = aLine.Substring( pos + iPrefix.Length );
+                    }
+                }
+            }
+
+            // Data processing stage
+            if ( handled )
+            {
+                ExtractedData data = PrepareExtractedData( line, aLine );
+                base.Interpreter.Interpret( data );
+            }
+
+            // Done
+            return handled;
+        }
+        #endregion
+
+        #region Properties
+        public override string Hash
+        {
+            get { return iThreadName; }
+        }
+        #endregion
+
+        #region Internal methods
+        private ExtractedData PrepareExtractedData( string aLine, string aOriginalLine )
+        {
+            ExtractedData ret = null;
+            
+            // We need the heap base address before we are able to start
+            // extracting binary data.
+            DataSource ds = Interpreter.DataSource;
+            Elements.MetaData metaData = ds.MetaData;
+            Elements.Groups.GpHeap heapInfo = metaData.Heap;
+            uint baseAddress = heapInfo.HeapBaseAddress;
+            if ( baseAddress != 0 )
+            {
+                // We can now work out the next expected address
+                uint nextExpectedAddress = baseAddress + (uint) metaData.HeapData.Count;
+
+                // Build our regex string that will match the binary heap data.
+                string prefix = string.Format( "{0:x8}: ", nextExpectedAddress );
+                int pos = aLine.IndexOf( prefix );
+                if ( pos >= 0 )
+                {
+                    Match m = KHeapDataRegEx.Match( aLine );
+                    if ( m.Success )
+                    {
+                        List<byte> bytes = new List<byte>();
+                        //
+                        CaptureCollection data = m.Groups[ "Data" ].Captures;
+                        foreach ( Capture dataItem in data )
+                        {
+                            string hexValue = dataItem.Value.Trim();
+                            uint byteVal = System.Convert.ToUInt32( hexValue, KBaseHex );
+                            bytes.Add( (byte) byteVal );
+                        }
+                        //
+                        ret = ExtractedData.NewBinaryData( bytes.ToArray(), aOriginalLine );
+                    }
+                }
+                //
+                if ( ret == null )
+                {
+                    ret = ExtractedData.NewText( aLine, aOriginalLine );
+                }
+            }
+            else
+            {
+                ret = ExtractedData.NewText( aLine, aOriginalLine );
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KBaseHex = 16;
+        private const string KHeapDataPrefix = "HeapData -";
+        private const string KHeapDataDataSetStartMarker = "HEAP INFO FOR THREAD";
+        #endregion
+
+        #region Internal regular expressions
+        private static readonly Regex KHeapInfoInitialRegEx = new Regex( 
+            @"HEAP INFO FOR THREAD \'(?<ThreadName>.+)\'", 
+            RegexOptions.Singleline | RegexOptions.Compiled | RegexOptions.IgnoreCase );
+        private static readonly Regex KHeapDataRegEx = new Regex(
+                                                        @"\x3A" +
+                                                        @"\s{1}" +
+                                                        @"(?<Data>[a-fA-F0-9]{2}\s{1}){1,16}" +
+                                                        @"(?<Padding>\s{1}){0,44}",
+            RegexOptions.Singleline | RegexOptions.Compiled | RegexOptions.IgnoreCase );
+        #endregion
+
+        #region Data members
+        private string iPrefix = string.Empty;
+        private string iThreadName = string.Empty;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/Base/InterpreterBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.DataSources.Analyser.Extractor;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Interpreter
+{
+    internal abstract class InterpreterBase
+    {
+        #region Constructors & destructor
+        protected InterpreterBase()
+        {
+        }
+        #endregion
+
+        #region API
+        public abstract bool CanInterpretFrom( Extractor.Extractor aExtractor );
+
+        public abstract void PrepareToStart( Extractor.Extractor aExtractor );
+
+        public abstract void Interpret( ExtractedData aItem );
+        #endregion
+
+        #region Properties
+        public DataSource DataSource
+        {
+            get { return iDataSource; }
+            internal set { iDataSource = value; }
+        }
+        #endregion
+
+        #region Data members
+        private DataSource iDataSource = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/Implementations/InterpreterBinary.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.DataSources.Analyser.Extractor;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Interpreter
+{
+    internal sealed class InterpreterBinary// : InterpreterBase
+    {
+        /*
+        #region Constructors & destructor
+        public InterpreterBinary( DataSource aDataSource )
+            : base( aDataSource )
+        {
+        }
+        #endregion
+
+        #region API
+        public override void InterpretData( ExtractedData aData )
+        {
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HEAP INFO FOR THREAD 'EComServer::!ecomserver'
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - ==============================================
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HeapInfo - heapBaseAddress:     0x00700074
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HeapInfo - heapSize:                745352
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HeapInfo - heapChunkSize:           745472
+            // ...
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 00700084: 00 00 00 00 03 03 03 03 03 03 03 03 03 03 03 03 ................
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 00700094: 03 03 03 03 03 03 03 03 28 00 00 00 ec 47 28 80 ........(....G(.
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 007000a4: d8 0c 70 00 58 0d 70 00 f8 0c 70 00 03 03 03 03 ..p.X.p...p.....
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 007000b4: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ................
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 007000c4: 48 00 00 00 e8 2b 30 80 00 2c 30 80 ec 02 70 00 H....+0..,0...p.
+            //
+            // or
+            //
+            // HEAP INFO FOR THREAD 'ecomserver::!ecomserver'
+            // ==============================================
+            // HeapInfo - heapBaseAddress:     0x0f8c0074
+            // HeapInfo - heapSize:                262028
+        }
+        #endregion
+
+        #region Data members
+        #endregion
+         */
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/Implementations/InterpreterText.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,307 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+using SymbianStructuresLib.CodeSegments;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.DataSources.Analyser.Extractor;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Interpreter
+{
+    internal sealed class InterpreterText : InterpreterBase
+    {
+        #region Constructors & destructor
+        public InterpreterText()
+        {
+        }
+        #endregion
+
+        #region API
+        public override bool CanInterpretFrom( Extractor.Extractor aExtractor )
+        {
+            // The text interpreter only works with the text extractor
+            bool ret = ( aExtractor is Extractor.Implementations.ExtractorText );
+            if ( ret )
+            {
+            }
+            //
+            return ret;
+        }
+
+        public override void PrepareToStart( Extractor.Extractor aExtractor )
+        {
+            // Seed the data source with the thread name. We can do this immediately
+            // since the thread name is identified during the extractor initialisation
+            DataSource.ThreadName = aExtractor.Hash;
+        }
+
+        public override void Interpret( ExtractedData aItem )
+        {
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HEAP INFO FOR THREAD 'EComServer::!ecomserver'
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - ==============================================
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HeapInfo - heapBaseAddress:     0x00700074
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HeapInfo - heapSize:                745352
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - HeapInfo - heapChunkSize:           745472
+            // ...
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 00700084: 00 00 00 00 03 03 03 03 03 03 03 03 03 03 03 03 ................
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 00700094: 03 03 03 03 03 03 03 03 28 00 00 00 ec 47 28 80 ........(....G(.
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 007000a4: d8 0c 70 00 58 0d 70 00 f8 0c 70 00 03 03 03 03 ..p.X.p...p.....
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 007000b4: 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 03 ................
+            // [15:21:32.719] xti2:MCU_ASCII_PRINTF; channel:0xE0; msg:HeapData - EComServer::!ecomserver - 007000c4: 48 00 00 00 e8 2b 30 80 00 2c 30 80 ec 02 70 00 H....+0..,0...p.
+            //
+            // or
+            //
+            // HEAP INFO FOR THREAD 'ecomserver::!ecomserver'
+            // ==============================================
+            // HeapInfo - heapBaseAddress:     0x0f8c0074
+            // HeapInfo - heapSize:                262028
+
+            // Save the line - we must do this in order to be able to write a zip file
+            // containing the original source data for this data source.
+            DataSource.AddLine( aItem.OriginalLine );
+            
+            if ( aItem.Type == ExtractedData.TType.EBinaryData )
+            {
+                DataSource.MetaData.HeapData.Add( aItem.BinaryData );
+            }
+            else if ( aItem.Type == ExtractedData.TType.EText )
+            {
+                if ( CheckForKnownElement( aItem.Text ) )
+                {
+                }
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private bool CheckForKnownElement( string aLine )
+        {
+            bool handled = false;
+            string origLine = aLine;
+            //
+            if ( CheckForKnownElement( ref aLine, iPrefixes.HeapBaseAddress ) )
+            {
+                DataSource.MetaData.Heap.HeapBaseAddress = PrefixParser.ReadUint( ref aLine );
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.HeapChunkSize ) )
+            {
+                DataSource.MetaData.Heap.ChunkSize = PrefixParser.ReadUint( ref aLine );
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.SizeOfRHeap ) )
+            {
+                DataSource.MetaData.Heap.SizeOfRHeap = PrefixParser.ReadUint( ref aLine );
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.HeapCellMinimumSize ) )
+            {
+                DataSource.MetaData.Heap.MinCellSize = PrefixParser.ReadUint( ref aLine );
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.FreeCellAddress ) )
+            {
+                DataSource.MetaData.Heap.InfoFree.FreeCellAddress = PrefixParser.ReadUint( ref aLine );
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.FreeCellLength ) )
+            {
+                DataSource.MetaData.Heap.InfoFree.FreeCellLength = PrefixParser.ReadUint( ref aLine );
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.DebugAllocator ) )
+            {
+                DataSource.MetaData.Heap.DebugAllocator = PrefixParser.ReadBool( ref aLine );
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.MiscRHeapRand ) )
+            {
+                long val = PrefixParser.ReadLong( ref aLine );
+                uint rand = (uint) val;
+                DataSource.MetaData.Heap.Rand = rand;
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.FreeStatistics ) )
+            {
+                iState = TState.EStateStatisticsFree;
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.AllocStatistics ) )
+            {
+                iState = TState.EStateStatisticsAlloc;
+                handled = true;
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.FreeCellCount ) )
+            {
+                if ( iState == TState.EStateNone || iState == TState.EStateStatisticsFree )
+                {
+                    DataSource.MetaData.Heap.InfoFree.FreeCellCount = PrefixParser.ReadInt( ref aLine );
+                    handled = true;
+                }
+                else if ( iState == TState.EStateStatisticsAlloc )
+                {
+                    // Must also handle alloc cells inside the free block, because in the new file format
+                    // both alloc and free cell statistics contain the same prefix.
+                    DataSource.MetaData.Heap.InfoAlloc.AllocCellCount = PrefixParser.ReadInt( ref aLine );
+                    handled = true;
+                }
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.CommonStatisticsSizeOfCells ) )
+            {
+                if ( iState == TState.EStateStatisticsFree )
+                {
+                    DataSource.MetaData.Heap.InfoFree.FreeCellTotalSpace = PrefixParser.ReadUint( ref aLine );
+                    handled = true;
+                }
+                else if ( iState == TState.EStateStatisticsAlloc )
+                {
+                    DataSource.MetaData.Heap.InfoAlloc.AllocCellTotalSpace = PrefixParser.ReadUint( ref aLine );
+                    handled = true;
+                }
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.AllocCellCount ) )
+            {
+                if ( iState == TState.EStateNone || iState == TState.EStateStatisticsAlloc )
+                {
+                    DataSource.MetaData.Heap.InfoAlloc.AllocCellCount = PrefixParser.ReadInt( ref aLine );
+                    handled = true;
+                }
+            }
+            else if ( CheckForKnownElement( ref aLine, iPrefixes.FreeCellList ) )
+            {
+                iState = TState.EStateFreeCellList;
+            }
+            else
+            {
+                // Check for free cell list match
+                if ( iState == TState.EStateFreeCellList )
+                {
+                    Match freeCellListMatch = KFreeCellRegEx.Match( aLine );
+                    if ( freeCellListMatch.Success )
+                    {
+                        int index = int.Parse( freeCellListMatch.Groups[ "Index" ].Value );
+                        uint address = uint.Parse( freeCellListMatch.Groups[ "Address" ].Value, System.Globalization.NumberStyles.AllowHexSpecifier );
+                        int length = int.Parse( freeCellListMatch.Groups[ "Length" ].Value );
+                        int type = int.Parse( freeCellListMatch.Groups[ "Type" ].Value );
+
+                        // The index should be between 1 and FreeCellCount
+                        int max = DataSource.MetaData.Heap.InfoFree.FreeCellCount;
+
+                        // However, if we didn't read the free cell count then don't panic...
+                        if ( max > 0 )
+                        {
+                            if ( index >= 1 && index <= max )
+                            {
+                                DataSource.MetaData.Heap.InfoFree.AddFreeCell( address, length, type );
+                            }
+                            else
+                            {
+                                DataSource.AddError( DataSource.TErrorTypes.EErrorTypeInvalidFreeCellIndexInFreeList );
+                            }
+                        }
+                        else
+                        {
+                            // No free cell to validate against, just hope it's okay!
+                            DataSource.MetaData.Heap.InfoFree.AddFreeCell( address, length, type );
+                        }
+                    }
+                }
+
+                // Is it a code segment?
+                if ( !handled )
+                {
+                    CodeSegDefinition def = CodeSegDefinitionParser.ParseDefinition( aLine );
+                    if ( def != null )
+                    {
+                        DataSource.MetaData.CodeSegments.Add( def );
+                    }
+                }
+            }
+            //
+            return handled;
+        }
+
+        private bool CheckForKnownElement( ref string aLine, string[] aPrefixes )
+        {
+            bool handled = false;
+            //
+            foreach ( string prefix in aPrefixes )
+            {
+                if ( aLine.Contains( prefix ) )
+                {
+                    PrefixParser.SkipPrefix( prefix, ref aLine );
+                    handled = true;
+                    break;
+                }
+            }
+            //
+            return handled;
+        }
+        #endregion
+
+        #region Internal enumerations
+        private enum TState
+        {
+            EStateNone = 0,
+            EStateStatisticsFree,
+            EStateStatisticsAlloc,
+            EStateFreeCellList,
+        }
+        #endregion
+
+        #region Internal constants
+        private readonly static Regex KFreeCellRegEx = new Regex(
+           "FC\\s(?<Index>[0-9]{4})\\s+0x(?<Address>[0-9a-fA-F]{8})\\s+(" +
+           "?<Length>[0-9]+)\\s(?<Type>[0-9]{1})\r\n",
+           RegexOptions.Multiline
+         | RegexOptions.CultureInvariant
+         | RegexOptions.IgnorePatternWhitespace
+         | RegexOptions.Compiled
+         ); 
+        #endregion
+
+        #region Data members
+        private Prefixes iPrefixes = new Prefixes();
+        private TState iState = TState.EStateNone;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Interpreter/InterpreterFactory.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+using HeapLib.Reconstructor.DataSources.Analyser.Extractor;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Interpreter
+{
+    internal sealed class InterpreterFactory
+    {
+        #region Constructors & destrutor
+        public InterpreterFactory()
+        {
+            Type type = typeof( InterpreterBase );
+            Type[] types = Assembly.GetExecutingAssembly().GetTypes();
+            foreach ( Type t in types )
+            {
+                if ( t.IsClass && type.IsAssignableFrom( t ) && !t.IsAbstract )
+                {
+                    iTypes.Add( t );
+                }
+            }
+        }
+        #endregion
+
+        #region API
+        public InterpreterBase FindSuitableInterpreter( Extractor.Extractor aExtractor )
+        {
+            InterpreterBase ret = null;
+            //
+            foreach ( Type type in iTypes )
+            {
+                InterpreterBase interpreter = CreateInstance( type );
+                try
+                {
+                    bool canDoIt = interpreter.CanInterpretFrom( aExtractor );
+                    if ( canDoIt )
+                    {
+                        ret = interpreter;
+                        break;
+                    }
+                }
+                catch ( Exception )
+                {
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        private InterpreterBase CreateInstance( Type aType )
+        {
+            object[] parameters = new object[] { };
+            InterpreterBase ret = (InterpreterBase) Activator.CreateInstance( aType, parameters );
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        private List<Type> iTypes = new List<Type>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Readers/ReaderFile.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+using HeapLib.Reconstructor.Misc;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Readers
+{
+    internal sealed class ReaderFile : AsyncTextFileReader
+    {
+        #region Constructors & destructor
+        public ReaderFile( DataSourceAnalyser aParent, string aFileName )
+            : base( aFileName )
+        {
+            iParent = aParent;
+        }
+        #endregion
+
+        #region API
+        public void StartRead()
+        {
+            base.AsyncRead();
+        }
+        #endregion
+
+        #region From AsyncTextDataReader
+        protected override void HandleFilteredLine( string aLine )
+        {
+            iPrefixCleaner.CleanLine( ref aLine );
+            iParent.HandleFilteredLine( aLine, base.LineNumber );
+        }
+        #endregion
+
+        #region Data members
+        private readonly DataSourceAnalyser iParent;
+        private TracePrefixAnalyser iPrefixCleaner = new TracePrefixAnalyser();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Analyser/Readers/ReaderLines.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+using SymbianUtils;
+using HeapLib.Reconstructor.Misc;
+
+namespace HeapLib.Reconstructor.DataSources.Analyser.Readers
+{
+    internal sealed class ReaderLines : AsyncTextDataReader
+    {
+        #region Constructors & destructor
+        public ReaderLines( DataSourceAnalyser aParent, string[] aLines )
+            : base( aLines )
+        {
+            iParent = aParent;
+        }
+        #endregion
+
+        #region API
+        public void StartRead()
+        {
+            base.AsyncRead();
+        }
+        #endregion
+
+        #region From AsyncTextDataReader
+        protected override void HandleFilteredLine( string aLine )
+        {
+            iPrefixCleaner.CleanLine( ref aLine );
+            iParent.HandleFilteredLine( aLine, base.LineNumber );
+        }
+        #endregion
+
+        #region Data members
+        private readonly DataSourceAnalyser iParent;
+        private TracePrefixAnalyser iPrefixCleaner = new TracePrefixAnalyser();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Data/GlobalData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Data
+{
+    public class GlobalData
+    {
+        #region Constructors & destructor
+        public GlobalData()
+        {
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Data/HeapData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Reconstructor.Misc;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Data
+{
+    public class HeapData
+    {
+        #region Constructors & destructor
+        public HeapData()
+        {
+            iData = new List<byte>( 2 * 1024 * 1024 );
+        }
+        #endregion
+
+        #region API
+        public void Add( byte[] aData )
+        {
+            iData.AddRange( aData );
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iData.Count; }
+        }
+
+        public byte[] Data
+        {
+            get { return iData.ToArray(); }
+        }
+        #endregion
+
+        #region Data members
+        private readonly List<byte> iData;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Data/StackData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Data
+{
+    public class StackData
+    {
+        #region Constructors & destructor
+        public StackData()
+        {
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpChunks.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,116 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Groups
+{
+    public class GpChunkCollection
+    {
+        #region Constructors & destructor
+        public GpChunkCollection()
+        {
+        }
+        #endregion
+
+        #region API
+        public void Add( GpChunk aChunk )
+        {
+            iEntries.Add( aChunk );
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iEntries.Count; }
+        }
+        #endregion
+
+        #region Data members
+        private List<GpChunk> iEntries = new List<GpChunk>();
+        #endregion
+    }
+
+    public class GpChunk
+    {
+        #region Constructors & destructor
+        public GpChunk()
+        {
+        }
+        #endregion
+
+        #region API
+
+        #endregion
+
+        #region Properties
+        public uint BaseAddress
+        {
+            get { return iBaseAddress; }
+            set { iBaseAddress = value; }
+        }
+
+        public uint Size
+        {
+            get { return iSize; }
+            set { iSize = value; }
+        }
+
+        public uint Handle
+        {
+            get { return iHandle; }
+            set { iHandle = value; }
+        }
+
+        public string Name
+        {
+            get { return iName; }
+            set { iName = value; }
+        }
+        #endregion
+
+        #region Data members
+        private uint iBaseAddress = 0;
+        private uint iSize = 0;
+        private uint iHandle = 0;
+        private string iName = string.Empty;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpFooter.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Groups
+{
+    public class GpFooter
+    {
+        #region Constructors & destructor
+        public GpFooter()
+        {
+        }
+        #endregion
+
+        #region API
+
+        #endregion
+
+        #region Properties
+        public uint Signature
+        {
+            get { return iSignature; }
+            set { iSignature = value; }
+        }
+
+        public int EntryCount
+        {
+            get { return iEntryCount; }
+            set { iEntryCount = value; }
+        }
+
+        #endregion
+
+        #region Data members
+        private uint iSignature = 0;
+        private int iEntryCount = 0;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeader.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Groups
+{
+    public class GpHeader
+    {
+        #region Constructors & destructor
+        public GpHeader()
+        {
+        }
+        #endregion
+
+        #region API
+
+        #endregion
+
+        #region Properties
+        public uint Signature
+        {
+            get { return iSignature; }
+            set { iSignature = value; }
+        }
+
+        public int VersionNumber
+        {
+            get { return iVersionNumber; }
+            set { iVersionNumber = value; }
+        }
+
+        public uint ExpectedDataSize
+        {
+            get { return iExpectedDataSize; }
+            set { iExpectedDataSize = value; }
+        }
+
+        public uint ProcessId
+        {
+            get { return iProcessId; }
+            set { iProcessId = value; }
+        }
+
+        public uint ThreadId
+        {
+            get { return iThreadId; }
+            set { iThreadId = value; }
+        }
+
+        public bool IsUserThread
+        {
+            get { return iIsUserThread; }
+            set { iIsUserThread = value; }
+        }
+
+        public string ThreadName
+        {
+            get { return iThreadName; }
+            set { iThreadName = value; }
+        }
+        #endregion
+
+        #region Data members
+        private uint iSignature = 0;
+        private int iVersionNumber = 0;
+        private uint iExpectedDataSize = 0;
+        private uint iProcessId = 0;
+        private uint iThreadId = 0;
+        private bool iIsUserThread = false;
+        private string iThreadName = string.Empty;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeap.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,187 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Groups
+{
+    public class GpHeap
+    {
+        #region Constructors & destructor
+        public GpHeap()
+        {
+        }
+        #endregion
+
+        #region API
+        public uint GetExpectedAmountOfHeapData()
+        {
+            uint ret = ChunkSize - SizeOfRHeap;
+            //
+            if ( SizeOfRHeap == 0 )
+            {
+                // Maybe we have the allocated/free stats instead
+                ret = InfoAlloc.AllocCellTotalSpace + InfoFree.FreeCellTotalSpace;
+            }
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public bool IsDebugAllocatorWithStoredStackAddresses
+        {
+            get
+            {
+                bool ret = DebugAllocator;
+                if ( ret )
+                {
+                    // Check high word of iRand for our special marker
+                    uint masked = ( iRand & 0xFFFF0000 ) >> 16;
+                    ret = ( masked == 0xDADD );
+                }
+                return ret;
+            }
+        }
+
+        public uint TypeUid
+        {
+            get { return iTypeUid; }
+            set { iTypeUid = value; }
+        }
+
+        // <summary>
+        // This is the base address of the heap, NOT the base address of the heap chunk.
+        // </summary>
+        public uint HeapBaseAddress
+        {
+            get { return iBaseAddress; }
+            set { iBaseAddress = value; }
+        }
+
+        // <summary>
+        // This is the size of the heap chunk, not the size of the heap
+        // </summary>
+        public uint ChunkSize
+        {
+            get { return iSize; }
+            set { iSize = value; }
+        }
+
+        // <summary>
+        // This is the size of the RHeap object, in bytes
+        // </summary>
+        public uint SizeOfRHeap
+        {
+            get { return iSizeOfRHeap; }
+            set
+            {
+                // MemSpy's size doesn't include the vtable
+                // and therefore ChunkSize - value - 4 is actually the
+                // correct size of the heap data.
+                iSizeOfRHeap = value + KSizeOfRHeapVTable; 
+            }
+        }
+
+        public uint MinSize
+        {
+            get { return iMinSize; }
+            set { iMinSize = value; }
+        }
+
+        public uint MaxSize
+        {
+            get { return iMaxSize; }
+            set { iMaxSize = value; }
+        }
+
+        public uint Slack
+        {
+            get { return iSlack; }
+            set { iSlack = value; }
+        }
+
+        public bool DebugAllocator
+        {
+            get { return iDebugAllocator; }
+            set { iDebugAllocator = value; }
+        }
+
+        public uint MinCellSize
+        {
+            get { return iMinCellSize; }
+            set { iMinCellSize = value; }
+        }
+
+        public uint Rand
+        {
+            get { return iRand; }
+            set { iRand = value; }
+        }
+
+        public GpHeapAllocCell InfoAlloc
+        {
+            get { return iGroupCellAlloc; }
+        }
+
+        public GpHeapFreeCell InfoFree
+        {
+            get { return iGroupCellFree; }
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KSizeOfRHeapVTable = 4;
+        #endregion
+
+        #region Data members
+        private uint iTypeUid = 0;
+        private uint iBaseAddress = 0;
+        private uint iSize = 0;
+        private uint iSizeOfRHeap = 0;
+        private uint iMinSize = 0;
+        private uint iMaxSize = 0;
+        private uint iSlack = 0;
+        private bool iDebugAllocator = false;
+        private uint iMinCellSize = 0;
+        private uint iRand = 0;
+        private GpHeapAllocCell iGroupCellAlloc = new GpHeapAllocCell();
+        private GpHeapFreeCell iGroupCellFree = new GpHeapFreeCell();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeapAllocCell.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Groups
+{
+    public class GpHeapAllocCell
+    {
+        #region Constructors & destructor
+        public GpHeapAllocCell()
+        {
+        }
+        #endregion
+
+        #region API
+
+        #endregion
+
+        #region Properties
+        public int AllocCellCount
+        {
+            get { return iAllocCellCount; }
+            set { iAllocCellCount = value; }
+        }
+
+        public uint AllocCellLargestAddress
+        {
+            get { return iAllocCellLargestAddress; }
+            set { iAllocCellLargestAddress = value; }
+        }
+
+        public uint AllocCellLargestLength
+        {
+            get { return iAllocCellLargestLength; }
+            set { iAllocCellLargestLength = value; }
+        }
+
+        public uint AllocCellTotalSpace
+        {
+            get { return iAllocCellTotalSpace; }
+            set { iAllocCellTotalSpace = value; }
+        }
+        #endregion
+
+        #region Data members
+        private int iAllocCellCount = 0;
+        private uint iAllocCellLargestAddress = 0;
+        private uint iAllocCellLargestLength = 0;
+        private uint iAllocCellTotalSpace = 0;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/Groups/GpHeapFreeCell.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,187 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.DataSources.Elements.Groups
+{
+    public class GpHeapFreeCell
+    {
+        #region Constructors & destructor
+        public GpHeapFreeCell()
+        {
+        }
+        #endregion
+
+        #region API
+        public bool IsFreeCell( uint aAddress )
+        {
+            bool ret = false;
+            //
+            if ( iFreeCellAddress != aAddress )
+            {
+                if ( iFreeCellLargestAddress != aAddress )
+                {
+                    ret = iCells.ContainsKey( aAddress );
+                    if ( ret )
+                    {
+                        // Debugging support
+                        System.Diagnostics.Debug.WriteLine( "FC: 0x" + aAddress.ToString( "x8" ) );
+                        int x = 0;
+                        x++;
+                    }
+                }
+                else
+                {
+                    ret = true;
+                }
+            }
+            else
+            {
+                ret = true;
+            }
+            //
+            return ret;
+        }
+
+        public void AddFreeCell( uint aAddress, int aLength, int aType )
+        {
+            if ( iCells.ContainsKey( aAddress ) == false )
+            {
+                iCells.Add( aAddress, new FreeCell( aAddress, aLength, aType ) );
+            }
+        }
+        #endregion
+
+        #region Properties
+        public uint FreeCellAddress
+        {
+            get { return iFreeCellAddress; }
+            set { iFreeCellAddress = value; }
+        }
+
+        public uint FreeCellLength
+        {
+            get { return iFreeCellLength; }
+            set { iFreeCellLength = value; }
+        }
+
+        public int FreeCellCount
+        {
+            get { return iFreeCellCount; }
+            set { iFreeCellCount = value; }
+        }
+
+        public uint FreeCellLargestAddress
+        {
+            get { return iFreeCellLargestAddress; }
+            set { iFreeCellLargestAddress = value; }
+        }
+
+        public uint FreeCellLargestLength
+        {
+            get { return iFreeCellLargestLength; }
+            set { iFreeCellLargestLength = value; }
+        }
+
+        public uint FreeCellTotalSpace
+        {
+            get { return iFreeCellTotalSpace; }
+            set { iFreeCellTotalSpace = value; }
+        }
+        #endregion
+
+        #region Data members
+        private uint iFreeCellAddress = 0;
+        private uint iFreeCellLength = 0;
+        private int iFreeCellCount = 0;
+        private uint iFreeCellLargestAddress = 0;
+        private uint iFreeCellLargestLength = 0;
+        private uint iFreeCellTotalSpace = 0;
+        private Dictionary<uint,FreeCell> iCells = new Dictionary<uint, FreeCell>();
+        #endregion
+    }
+
+    internal class FreeCell
+    {
+        #region Enumerations
+        public enum TType
+        {
+            EGoodAllocatedCell = 0,
+            EGoodFreeCell,
+            EBadAllocatedCellSize,
+            EBadAllocatedCellAddress,
+            EBadFreeCellAddress,
+            EBadFreeCellSize
+        }
+        #endregion
+
+        #region Constructors & destructor
+        public FreeCell( uint aAddress, int aLength, int aType )
+        {
+            iAddress = aAddress;
+            iLength = aLength;
+            iType = (TType) aType;
+        }
+        #endregion
+
+        #region Properties
+        public uint Address
+        {
+            get { return iAddress; }
+        }
+
+        public int Length
+        {
+            get { return iLength; }
+        }
+
+        public TType Type
+        {
+            get { return iType; }
+        }
+        #endregion
+
+        #region Data members
+        private readonly uint iAddress;
+        private readonly int iLength;
+        private readonly TType iType;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Elements/MetaData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SymbianStructuresLib.CodeSegments;
+using HeapLib.Reconstructor.DataSources.Elements.Data;
+using HeapLib.Reconstructor.DataSources.Elements.Groups;
+
+namespace HeapLib.Reconstructor.DataSources.Elements
+{
+    public class MetaData
+    {
+        #region Constructors & destructor
+        public MetaData()
+        {
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        public HeapData HeapData
+        {
+            get { return iDataHeap; }
+        }
+
+        public StackData StackData
+        {
+            get { return iDataStack; }
+        }
+
+        public GlobalData GlobalData
+        {
+            get { return iDataGlobal; }
+        }
+
+        public GpChunkCollection Chunks
+        {
+            get { return iGroupChunks; }
+        }
+
+        public GpHeader Header
+        {
+            get { return iGroupHeader; }
+        }
+
+        public GpFooter Footer
+        {
+            get { return iGroupFooter; }
+        }
+
+        public GpHeap Heap
+        {
+            get { return iGroupHeap; }
+        }
+
+        public CodeSegDefinitionCollection CodeSegments
+        {
+            get { return iCodeSegments; }
+        }
+
+        public bool IsDataComplete
+        {
+            get
+            {
+                bool ret = true;
+
+                long actualCount = iDataHeap.Count;
+                long expectedCount = iGroupHeap.GetExpectedAmountOfHeapData();
+                if ( actualCount > 0 && expectedCount > 0 )
+                {
+                    ret = ( actualCount == expectedCount );
+                }
+                //
+                return ret;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private HeapData iDataHeap = new HeapData();
+        private StackData iDataStack = new StackData();
+        private GlobalData iDataGlobal = new GlobalData();
+        private GpChunkCollection iGroupChunks = new GpChunkCollection();
+        private GpHeader iGroupHeader = new GpHeader();
+        private GpFooter iGroupFooter = new GpFooter();
+        private GpHeap iGroupHeap = new GpHeap();
+        private CodeSegDefinitionCollection iCodeSegments = new CodeSegDefinitionCollection();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Source/DataSource.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,203 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils.FileSystem.FilePair;
+using HeapLib.Reconstructor.DataSources.Analyser.Interpreter;
+using HeapLib.Reconstructor.DataSources.Analyser.Extractor;
+
+namespace HeapLib.Reconstructor.DataSources
+{
+    public class DataSource
+    {
+        #region Enumerations
+        public enum TSourceType
+        {
+            ESourceTypeTextTrace = 0,
+            ESourceTypeTextDynamic,
+            ESourceTypeBinary
+        }
+
+        [Flags]
+        public enum TErrorTypes
+        {
+            EErrorTypeNone = 0,
+            EErrorTypeInvalidFreeCellIndexInFreeList = 1,
+            EErrorTypeFreeCellAddressOutOfBounds = 2,
+            EErrorTypeDataMissing = 4,
+        }
+        #endregion
+
+        #region Constructors & destructor
+        internal DataSource( string aFileName, long aLineNumber )
+        {
+            iFileName = aFileName;
+            iLineNumber = aLineNumber;
+        }
+        #endregion
+
+        #region API
+        internal void AddLine( string aLine )
+        {
+            iLines.Add( aLine );
+        }
+
+        internal void AddError( TErrorTypes aError )
+        {
+            iErrorType |= aError;
+        }
+
+        public bool ErrorsDetected()
+        {
+            string msg = string.Empty;
+            return ErrorsDetected( out msg );
+        }
+
+        public bool ErrorsDetected( out string aMessage )
+        {
+            StringBuilder msg = new StringBuilder();
+            //
+            if ( ( iErrorType & TErrorTypes.EErrorTypeDataMissing ) == TErrorTypes.EErrorTypeDataMissing )
+            {
+                msg.AppendLine( "ERROR: Data is incomplete." );
+            }
+            if ( ( iErrorType & TErrorTypes.EErrorTypeInvalidFreeCellIndexInFreeList ) == TErrorTypes.EErrorTypeInvalidFreeCellIndexInFreeList )
+            {
+                msg.AppendLine( "ERROR: Mis-match between free cell list and free cell count." );
+            }
+            if ( ( iErrorType & TErrorTypes.EErrorTypeFreeCellAddressOutOfBounds ) == TErrorTypes.EErrorTypeFreeCellAddressOutOfBounds )
+            {
+                msg.AppendLine( "ERROR: Free cell address falls outside heap bounds." );
+            }
+            //
+            aMessage = msg.ToString();
+            return ( iErrorType != TErrorTypes.EErrorTypeNone );
+        }
+
+        public FileNamePair PrepareSourceFileDataForZip()
+        {
+            FileNamePair ret = new FileNamePair( FileName );
+
+            // Need to make a temporary file
+            string tempFileName = Path.GetTempFileName();
+            using ( StreamWriter writer = new StreamWriter( tempFileName, false ) )
+            {
+                foreach ( string line in iLines )
+                {
+                    writer.WriteLine( line );
+                }
+            }
+
+            ret = new FileNamePair( tempFileName );
+            ret.Destination = "HeapData/SourceData.txt";
+            ret.DeleteFile = true;
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public TSourceType SourceType
+        {
+            get
+            {
+                TSourceType ret = TSourceType.ESourceTypeTextDynamic;
+                //
+                if ( FileName.Length > 0 )
+                {
+                    ret = TSourceType.ESourceTypeTextTrace;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public string FileName
+        {
+            get { return iFileName; }
+        }
+
+        public string ThreadName
+        {
+            get { return iThreadName; }
+            set { iThreadName = value; }
+        }
+
+        public Elements.MetaData MetaData
+        {
+            get { return iMetaData; }
+        }
+
+        internal bool IsEmpty
+        {
+            get
+            {
+                bool empty = iMetaData.HeapData.Count == 0;
+                return empty;
+            }
+        }
+
+        public long LineNumber
+        {
+            get { return iLineNumber; }
+        }
+        #endregion
+
+        #region From System.Object
+        public override string ToString()
+        {
+            StringBuilder ret = new StringBuilder();
+            ret.AppendFormat( "{0} @ line {1:d6}, {2} bytes, {3} allocs", ThreadName, LineNumber, MetaData.Heap.ChunkSize, MetaData.Heap.InfoAlloc.AllocCellCount );
+            return ret.ToString();
+        }
+        #endregion
+
+        #region Data members
+        private readonly string iFileName;
+        private readonly long iLineNumber;
+        private TErrorTypes iErrorType = TErrorTypes.EErrorTypeNone;
+        private string iThreadName = string.Empty;
+        private List<string> iLines = new List<string>();
+        private Elements.MetaData iMetaData = new HeapLib.Reconstructor.DataSources.Elements.MetaData();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Source/DataSourceCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,221 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils.FileSystem.FilePair;
+
+namespace HeapLib.Reconstructor.DataSources
+{
+    public sealed class DataSourceCollection : IEnumerable<DataSource>
+    {
+        #region Constructors & destructor
+        public DataSourceCollection()
+        {
+        }
+
+        public DataSourceCollection( DataSourceCollection aList1, DataSourceCollection aList2 )
+        {
+            foreach ( DataSource source in aList1 )
+            {
+                if ( aList2.IndexOf( source.ThreadName ) >= 0 )
+                {
+                    Add( source );
+                }
+            }
+        }
+        #endregion
+
+        #region API
+        public int IndexOf( string aThread )
+        {
+            int ret = -1;
+            //
+            for ( int i = 0; i < Count; i++ )
+            {
+                DataSource src = this[ i ];
+                if ( src.ThreadName.ToUpper() == aThread.ToUpper() )
+                {
+                    ret = i;
+                    break;
+                }
+            }
+            //
+            return ret;
+        }
+
+        public void RemoveAt( int aIndex )
+        {
+            iEntries.RemoveAt( aIndex );
+        }
+
+        public void Clear()
+        {
+            iEntries.Clear();
+        }
+
+        internal void RemoveEmptySources()
+        {
+            int count = Count;
+            for ( int i = count - 1; i >= 0; i-- )
+            {
+                DataSource src = this[ i ];
+                if ( src.IsEmpty )
+                {
+                    iEntries.RemoveAt( i );
+                }
+            }
+        }
+
+        internal void Add( DataSource aSource )
+        {
+            iEntries.Add( aSource );
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iEntries.Count; }
+        }
+
+        public DataSource this[ int aIndex ]
+        {
+            get
+            {
+                DataSource ret = iEntries[ aIndex ];
+                return ret;
+            }
+        }
+
+        public DataSource this[ string aThread ]
+        {
+            get
+            {
+                DataSource ret = null;
+                //
+                int index = IndexOf( aThread );
+                if ( index >= 0 && index < Count )
+                {
+                    ret = this[ index ];
+                }
+                //
+                return ret;
+            }
+        }
+
+        public DataSource Last
+        {
+            get
+            {
+                DataSource ret = this[ Count - 1 ];
+                return ret;
+            }
+        }
+        #endregion
+
+        #region IEnumerable<DataSource> Members
+        IEnumerator<DataSource> IEnumerable<DataSource>.GetEnumerator()
+        {
+            return new DataSourceCollectionEnumerator( this );
+        }
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return new DataSourceCollectionEnumerator( this );
+        }
+        #endregion
+
+        #region Data members
+        private List<DataSource> iEntries = new List<DataSource>();
+        #endregion
+    }
+
+    #region Internal enumerator class
+    internal sealed class DataSourceCollectionEnumerator : IEnumerator<DataSource>
+    {
+        #region Constructors & destructor
+        public DataSourceCollectionEnumerator( DataSourceCollection aCollection )
+        {
+            iCollection = aCollection;
+        }
+        #endregion
+
+        #region IEnumerator Members
+        public void Reset()
+        {
+            iCurrentIndex = -1;
+        }
+
+        public object Current
+        {
+            get
+            {
+                return (DataSource) iCollection[ iCurrentIndex ];
+            }
+        }
+
+        public bool MoveNext()
+        {
+            return ( ++iCurrentIndex < iCollection.Count );
+        }
+        #endregion
+
+        #region From IEnumerator<DataSource>
+        DataSource IEnumerator<DataSource>.Current
+        {
+            get { return iCollection[ iCurrentIndex ]; }
+        }
+        #endregion
+
+        #region From IDisposable
+        public void Dispose()
+        {
+        }
+        #endregion
+
+        #region Data members
+        private readonly DataSourceCollection iCollection;
+        private int iCurrentIndex = -1;
+        #endregion
+    }
+    #endregion
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Thread/DataSourceThread.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils.FileSystem.FilePair;
+
+namespace HeapLib.Reconstructor.DataSources
+{
+    public class HeapReconstructorDataSourceThread
+    {
+		#region Constructors & destructor
+		public HeapReconstructorDataSourceThread()
+            : this( string.Empty )
+		{
+		}
+
+        public HeapReconstructorDataSourceThread( string aThreadName )
+            : this( aThreadName, string.Empty )
+        {
+        }
+
+		public HeapReconstructorDataSourceThread( string aThreadName, string aPrefix )
+		{
+            iName = aThreadName;
+            iPrefix = aPrefix;
+		}
+		#endregion
+
+		#region API
+		#endregion
+
+		#region Properties
+		public string Name
+		{
+            get { return iName; }
+            set { iName = value; }
+		}
+
+        public string Prefix
+		{
+			get { return iPrefix; }
+			set { iPrefix = value; }
+		}
+		#endregion
+
+        #region From System.Object
+        public override string ToString()
+        {
+            return Name;
+        }
+        #endregion
+
+        #region Data members
+        private string iName = string.Empty;
+        private string iPrefix = string.Empty;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/DataSources/Thread/DataSourceThreadCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,189 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace HeapLib.Reconstructor.DataSources
+{
+    public class HeapReconstructorDataSourceThreadCollection : IEnumerable<HeapReconstructorDataSourceThread>
+    {
+        #region Constructors & destructor
+        public HeapReconstructorDataSourceThreadCollection()
+        {
+        }
+        #endregion
+
+        #region API
+        public void Add( string aThreadName )
+        {
+            iItems.Add( new HeapReconstructorDataSourceThread( aThreadName ) );
+        }
+
+        public void Add( string aThreadName, string aPrefix )
+        {
+            iItems.Add( new HeapReconstructorDataSourceThread( aThreadName, aPrefix ) );
+        }
+
+        public void Add( HeapReconstructorDataSourceThread aItem )
+        {
+            iItems.Add( aItem );
+        }
+
+        public bool Contains( string aThread )
+        {
+            bool ret = false;
+            //
+            foreach ( HeapReconstructorDataSourceThread item in iItems )
+            {
+                if ( item.Name == aThread )
+                {
+                    ret = true;
+                    break;
+                }
+            }
+            //
+            return ret;
+        }
+
+        public int IndexOf( string aThread )
+        {
+            string thread = aThread.ToLower();
+            int index = -1;
+            //
+            for ( int i = 0; i < iItems.Count; i++ )
+            {
+                HeapReconstructorDataSourceThread item = iItems[ i ];
+                if ( item.Name.ToLower() == thread )
+                {
+                    index = i;
+                    break;
+                }
+            }
+            //
+            return index;
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iItems.Count; }
+        }
+
+        public HeapReconstructorDataSourceThread this[ int aIndex ]
+        {
+            get { return iItems[ aIndex ]; }
+        }
+        #endregion
+
+        #region IEnumerable<HeapReconstructorDataSourceThread> Members
+        IEnumerator<HeapReconstructorDataSourceThread> IEnumerable<HeapReconstructorDataSourceThread>.GetEnumerator()
+        {
+            return new HeapReconstructorDataSourceThreadEnumerator( this );
+        }
+        #endregion
+
+        #region IEnumerable Members
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return new HeapReconstructorDataSourceThreadEnumerator( this );
+        }
+        #endregion
+
+        #region Data members
+        private List<HeapReconstructorDataSourceThread> iItems = new List<HeapReconstructorDataSourceThread>();
+        #endregion
+    }
+
+    #region Enumerator
+    internal class HeapReconstructorDataSourceThreadEnumerator : IEnumerator<HeapReconstructorDataSourceThread>
+    {
+        #region Constructors & destructor
+        public HeapReconstructorDataSourceThreadEnumerator( HeapReconstructorDataSourceThreadCollection aCollection )
+        {
+            iCollection = aCollection;
+        }
+        #endregion
+
+        #region IEnumerator<HeapReconstructorDataSourceThread> Members
+        HeapReconstructorDataSourceThread IEnumerator<HeapReconstructorDataSourceThread>.Current
+        {
+            get
+            {
+                return iCollection[ iCurrentIndex ];
+            }
+        }
+        #endregion
+
+        #region IDisposable Members
+        void IDisposable.Dispose()
+        {
+        }
+        #endregion
+
+        #region IEnumerator Members
+        object IEnumerator.Current
+        {
+            get
+            {
+                return iCollection[ iCurrentIndex ];
+            }
+        }
+
+        bool IEnumerator.MoveNext()
+        {
+            return ( ++iCurrentIndex < iCollection.Count );
+        }
+
+        void IEnumerator.Reset()
+        {
+            iCurrentIndex = -1;
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapReconstructorDataSourceThreadCollection iCollection;
+        private int iCurrentIndex = -1;
+        #endregion
+    }
+    #endregion
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/HeapReconstructor.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,243 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianDebugLib.Engine;
+using SymbianUtils;
+using SymbianUtils.Range;
+using SymbianUtils.RawItems;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.RHeap.Extractor;
+
+namespace HeapLib.Reconstructor
+{
+	public sealed class HeapReconstructor
+	{
+        #region Events
+        public enum TEvent
+        {
+            EReconstructingStarted = 0,
+            EReconstructingProgress,
+            EReconstructingComplete
+        }
+
+        public delegate void Observer( TEvent aEvent, HeapReconstructor aReconstructor );
+        public event Observer iObserver;
+        public delegate void ExceptionHandler( string aTitle, string aBody );
+        public event ExceptionHandler iExceptionHandler;
+        #endregion
+
+        #region Constructors & destructor
+		public HeapReconstructor( DataSource aDataSource, Options aOptions, DbgEngine aDebugEngine )
+		{
+            iRelationshipInspector = new RelationshipInspector( iData, iStatistics );
+            iRelationshipInspector.iObserver += new AsyncReaderBase.Observer( RelationshipInspector_Observer );
+            //
+            iExtractor = new RHeapExtractor( aDataSource, aOptions, aDebugEngine, iRelationshipInspector, iStatistics, iData );
+            iExtractor.iObserver += new AsyncReaderBase.Observer( Extractor_Observer );
+            iExtractor.iExceptionHandler += new AsyncReaderBase.ExceptionHandler( Extractor_ExceptionHandler );
+		}
+        #endregion
+
+		#region API
+        public void Reconstruct()
+        {
+            iState = TState.EStateExtractingHeapObjects;
+            //
+            iData.Clear();
+            //
+            iStatistics.Clear();
+            iStatistics.HeapBaseAddress = SourceData.MetaData.Heap.HeapBaseAddress;
+            iStatistics.HeapSize = SourceData.MetaData.Heap.ChunkSize;
+            if ( iStatistics.HeapSize == 0 || iStatistics.HeapBaseAddress == 0 )
+            {
+                throw new ArgumentException( "Heap size or Heap base address not initialised" );
+            }
+            //
+            iExtractor.Extract();
+        }
+        #endregion
+
+		#region Properties
+        public AddressRange AddressRange
+        {
+            get { return Statistics.AddressRange; }
+        }
+
+		public Options Options
+		{
+            get { return iExtractor.Options; }
+        }
+
+		public HeapStatistics Statistics
+		{
+			get { return iStatistics; }
+		}
+
+		public uint AllocatedCellHeaderSize
+		{
+			get { return iExtractor.AllocatedCellHeaderSize; }
+		}
+
+		public HeapCellArray Data
+		{
+			get { return iData; }
+		}
+
+		public DataSource SourceData
+		{
+            get { return iExtractor.SourceData; }
+		}
+
+        public bool IsDebugAllocator
+        {
+            get { return SourceData.MetaData.Heap.DebugAllocator; }
+        }
+
+        public int Progress
+        {
+            get
+            {
+                int progress = 0;
+                //
+                progress += iExtractor.Progress;
+                progress += iRelationshipInspector.Progress;
+                //
+                return progress / 2;
+            }
+        }
+        #endregion
+
+        #region From System.Object
+        public string ToString( bool aShowAllEntries )
+        {
+            StringBuilder text = new StringBuilder();
+            //
+            int count = Data.Count;
+            for ( int i = 0; i < count; i++ )
+            {
+                HeapCell element = Data[ i ];
+                if ( aShowAllEntries || ( !aShowAllEntries && element.Symbol != null ) )
+                {
+                    string line = element.ToString() + Environment.NewLine;
+                    text.Append( line );
+                }
+            }
+            //
+            return text.ToString();
+        }
+        #endregion
+
+		#region Internal state enumeration
+		private enum TState
+		{
+            EStateExtractingHeapObjects = 0,
+            EStateInspectingCellRelationships,
+            EStateUpdatingStatistics
+		}
+		#endregion
+
+        #region Extractor observer
+        private void Extractor_Observer( AsyncReaderBase.TEvent aEvent, AsyncReaderBase aSender )
+        {
+            if ( iObserver != null )
+            {
+                if ( aEvent == AsyncReaderBase.TEvent.EReadingStarted )
+                {
+                    iObserver( TEvent.EReconstructingStarted, this );
+                }
+                else if ( aEvent == AsyncReaderBase.TEvent.EReadingComplete )
+                {
+                    iState = TState.EStateInspectingCellRelationships;
+                    iRelationshipInspector.Inspect();
+                    iObserver( TEvent.EReconstructingProgress, this );
+                }
+                else
+                {
+                    iObserver( TEvent.EReconstructingProgress, this );
+                }
+            }
+        }
+
+        private void Extractor_ExceptionHandler( Exception aException, AsyncReaderBase aSender )
+        {
+            System.Diagnostics.Debug.WriteLine( "EXTRACTOR EXCEPTION: " + aException.Message );
+            if ( iExceptionHandler != null )
+            {
+                iExceptionHandler( "Heap Extraction Exception", aException.Message + System.Environment.NewLine + aException.StackTrace );
+            }
+        }
+        #endregion
+
+        #region Relationship Inspector observer
+        private void RelationshipInspector_Observer( AsyncReaderBase.TEvent aEvent, AsyncReaderBase aSender )
+        {
+            if ( iObserver != null )
+            {
+                if ( aEvent == AsyncReaderBase.TEvent.EReadingStarted || aEvent == AsyncReaderBase.TEvent.EReadingProgress )
+                {
+                    iObserver( TEvent.EReconstructingProgress, this );
+                }
+                else if ( aEvent == AsyncReaderBase.TEvent.EReadingComplete )
+                {
+                    iState = TState.EStateUpdatingStatistics;
+                    iStatistics.Finalise( iData );
+                    iObserver( TEvent.EReconstructingComplete, this );
+                }
+            }
+        }
+        #endregion
+
+		#region Data members
+        private TState iState;
+        private HeapStatistics iStatistics = new HeapStatistics();
+        private HeapCellArray iData = new HeapCellArray();
+        private readonly RHeapExtractor iExtractor;
+		private readonly RelationshipInspector iRelationshipInspector;
+        #endregion
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/Misc/Options.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapLib.Reconstructor.DataSources;
+
+namespace HeapLib.Reconstructor.Misc
+{
+	public sealed class Options
+	{
+		#region Constructors & destructor
+		public Options()
+		{
+		}
+		#endregion
+
+		#region Properties
+		public bool MatchExactSymbols
+		{
+			get { return iMatchExactSymbols; }
+			set { iMatchExactSymbols = value; }
+		}
+
+		public bool AttemptToDecodeFreeCellContents
+		{
+			get { return iAttemptToDecodeFreeCellContents; }
+			set { iAttemptToDecodeFreeCellContents = value; }
+		}
+
+		public Prefixes Prefixes
+		{
+			get { return iPrefixes; }
+		}
+		#endregion
+
+		#region Data members
+		private bool iMatchExactSymbols = false;
+		private bool iAttemptToDecodeFreeCellContents = false;
+		private string iTracePrefix = string.Empty;
+		private Prefixes iPrefixes = new Prefixes();
+        private HeapReconstructorDataSourceThread iSpecificThreadFilter = new HeapReconstructorDataSourceThread();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/Misc/Prefixes.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,158 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+
+namespace HeapLib.Reconstructor.Misc
+{
+    public sealed class Prefixes
+	{
+		#region Constructors & destructor
+		public Prefixes()
+		{
+		}
+		#endregion
+
+		#region Properties
+        // <summary>
+        // This is the prefix for the base address of the heap, NOT the base address of the heap chunk.
+        // </summary>
+		public string[] HeapBaseAddress
+		{
+            get { return iHeapBaseAddress; }
+		}
+
+        // <summary>
+        // This is the prefix for the size of the heap chunk, not the size of the heap
+        // </summary>
+		public string[] HeapChunkSize
+		{
+            get { return iHeapSize; }
+		}
+
+        // <summary>
+        // This is the prefix for the size of the RHeap object
+        // </summary>
+        public string[] SizeOfRHeap
+        {
+            get { return iSizeOfRHeap; }
+        }
+
+        public string[] DebugAllocator
+		{
+			get { return iDebugAllocator; }
+		}
+
+        public string[] AllocCellCount
+        {
+            get { return iAllocCellCount; }
+        }
+
+        public string[] AllocStatistics
+        {
+            get { return iAllocStatistics; }
+        }
+
+        public string[] FreeCellAddress
+		{
+			get { return iFreeCellAddress; }
+		}
+
+        public string[] FreeCellLength
+		{
+			get { return iFreeCellLength; }
+		}
+
+        public string[] FreeCellCount
+		{
+			get { return iFreeCellCount; }
+		}
+
+        public string[] FreeStatistics
+        {
+            get { return iFreeStatistics; }
+        }
+
+        public string[] FreeCellList
+        {
+            get { return iFreeCellList; }
+        }
+
+        public string[] CommonStatisticsSizeOfCells
+        {
+            get { return iStatisticsSizeOfCells; }
+        }
+
+        public string[] HeapCellMinimumSize
+		{
+			get { return iHeapCellMinimumSize; }
+		}
+
+        public string[] CodeSegment
+		{
+			get { return iCodeSegment; }
+		}
+
+        public string[] MiscRHeapRand
+		{
+            get { return iMisc_RHeap_iRand; }
+		}
+		#endregion
+
+		#region Data members
+        private static readonly string[] iHeapSize = new string[] { "HeapInfo - heapSize:", "Chunk Size:" };
+        private static readonly string[] iHeapBaseAddress = new string[] { "HeapInfo - heapBaseAddress:", "RHeap::iBase" };
+		private static readonly string[] iDebugAllocator = new string[] { "HeapInfo - heapUsingDebugAlloc:", "Debug Allocator:" };
+        private static readonly string[] iSizeOfRHeap = new string[] { "Object Size:" };
+        private static readonly string[] iStatisticsSizeOfCells = new string[] { "Size of cells:" };
+        //
+        private static readonly string[] iMisc_RHeap_iRand = new string[] { "RHeap::iRand" };
+        //
+        private static readonly string[] iAllocCellCount = new string[] { "HeapInfo - heapCellAllocCount:", "Number of cells:" };
+        private static readonly string[] iAllocStatistics = new string[] { "Allocated Cell Statistics" };
+        //
+		private static readonly string[] iFreeCellAddress = new string[] {  "HeapInfo - heapFreeCellAddress:", "RHeap::iFree.next" };
+        private static readonly string[] iFreeCellCount = new string[] { "HeapInfo - heapFreeCellCount:", "Number of cells:" };
+        private static readonly string[] iFreeCellLength = new string[] { "HeapInfo - heapFreeCellLength:", "RHeap::iFree.len" };
+        private static readonly string[] iFreeStatistics = new string[] { "Free Cell Statistics" };
+        private static readonly string[] iFreeCellList = new string[] { "Free Cell List" };
+        //
+		private static readonly string[] iHeapCellMinimumSize = new string[] { "HeapInfo - heapMinCellSize:", "RHeap::iMinCell" };
+        private static readonly string[] iCodeSegment = new string[] { "CodeSegs - " };
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/ExtractionManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace HeapLib.Reconstructor.RHeap.Extractor
+{
+    internal class ExtractionManager
+    {
+        #region Constructors & destructor
+        public ExtractionManager()
+        {
+        }
+        #endregion
+
+        #region API
+        public bool TryToProcessLine( string aLine )
+        {
+            Match m = iRegEx.Match( aLine );
+            bool success = m.Success;
+	        //
+            if ( success )
+            {
+                GroupCollection groups = m.Groups;
+                iGpData = groups[ "Data" ].Captures;
+                iGpCharacters = groups[ "CharData" ].Captures;
+
+                // Get address
+                Group gpAddress = groups[ "Address" ];
+                string addressAsString = gpAddress.Value;
+                iCurrentHeapAddress = System.Convert.ToUInt32( addressAsString, KBaseHex );
+            }
+            //
+            return success;
+        }
+        #endregion
+
+        #region Properties
+        public uint CurrentHeapAddress
+        {
+            get { return iCurrentHeapAddress; }
+        }
+
+        public CaptureCollection Data
+        {
+            get { return iGpData; }
+        }
+
+        public CaptureCollection Characters
+        {
+            get { return iGpCharacters; }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Internal constants
+        private const int KBaseHex = 16;
+        #endregion
+
+        #region Data members
+        private static readonly Regex iRegEx = new Regex(
+            @"(?<Address>[a-fA-F0-9]{8})\x3A\s{1}(?<Data>[a-fA-F0-9]{2}\s{1}){1,16}(?<Padding>\s{1}){0,44}(?<CharData>.){16}",
+            RegexOptions.IgnoreCase
+            );
+
+        private uint iCurrentHeapAddress = 0;
+        private CaptureCollection iGpData = null;
+        private CaptureCollection iGpCharacters = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/ExtractionState.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeapLib.Reconstructor.DataSources;
+
+namespace HeapLib.Reconstructor.RHeap.Extractor
+{
+    internal class ExtractionState
+    {
+        #region Constructors & destructor
+        public ExtractionState( DataSource aSource )
+        {
+            iDataSource = aSource;
+        }
+        #endregion
+
+        #region API
+        public bool IsFreeCellAddress()
+        {
+            bool ret = false;
+            //
+            uint address = iCurrentAddress;
+            if ( address == iNextFreeCellAddress )
+            {
+                ret = true;
+            }
+            else
+            {
+                ret = iDataSource.MetaData.Heap.InfoFree.IsFreeCell( address );
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public bool DebugEnabled
+        {
+            get { return iDebugEnabled; }
+            set { iDebugEnabled = value; }
+        }
+
+        public bool EncounteredException
+        {
+            get { return iEncounteredException; }
+            set { iEncounteredException = value; }
+        }
+
+        public uint NextFreeCellAddress
+        {
+            get { return iNextFreeCellAddress; }
+            set { iNextFreeCellAddress = value; }
+        }
+
+        public uint NextFreeCellLength
+        {
+            get { return iNextFreeCellLength; }
+            set { iNextFreeCellLength = value; }
+        }
+
+        public uint NextCellAddress
+        {
+            get { return iStartOfNextCell; }
+            set { iStartOfNextCell = value; }
+        }
+
+        public uint ExpectedAddress
+        {
+            get { return iNextExpectedAddress; }
+            set { iNextExpectedAddress = value; }
+        }
+
+        public uint CurrentAddress
+        {
+            get { return iCurrentAddress; }
+            set { iCurrentAddress = value; }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Internal constants
+        private const int KBaseHex = 16;
+        #endregion
+
+        #region Data members
+        private readonly DataSource iDataSource;
+        private bool iDebugEnabled = false;
+        private bool iEncounteredException = false;
+        private uint iNextFreeCellAddress;
+        private uint iNextFreeCellLength;
+        private uint iNextExpectedAddress;
+        private uint iCurrentAddress = 0;
+        private uint iStartOfNextCell;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/Extractor.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,631 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianStructuresLib.CodeSegments;
+using SymbianStructuresLib.Debug.Symbols;
+using SymbianDebugLib.Engine;
+using SymbianDebugLib.PluginAPI.Types;
+using SymbianDebugLib.PluginAPI.Types.Symbol;
+using SymbianUtils;
+using SymbianUtils.Range;
+using SymbianUtils.RawItems;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources;
+
+namespace HeapLib.Reconstructor.RHeap.Extractor
+{
+    internal class RHeapExtractor : AsyncReaderBase
+    {
+        #region Constructors & destructor
+        public RHeapExtractor( DataSource aDataSource, Options aOptions, DbgEngine aDebugEngine, RelationshipInspector aRelationshipInspector, HeapStatistics aStatistics, HeapCellArray aData )
+        {
+            iData = aData;
+            iOptions = aOptions;
+            iStatistics = aStatistics;
+            iDataSource = aDataSource;
+            iDebugEngine = aDebugEngine;
+            iState = new ExtractionState( aDataSource );
+            iRelationshipInspector = aRelationshipInspector;
+            //
+            HeapCell.AllocatedCellHeaderSize = AllocatedCellHeaderSize;
+
+            // Must prime these
+            iState.NextFreeCellAddress = aDataSource.MetaData.Heap.InfoFree.FreeCellAddress;
+            iState.NextFreeCellLength = aDataSource.MetaData.Heap.InfoFree.FreeCellLength;
+            //
+            if ( iState.NextFreeCellAddress == 0 )
+            {
+                throw new ArgumentException( "Next free cell information invalid" );
+            }
+
+            //iState.DebugEnabled = true;
+        }
+        #endregion
+
+        #region API
+        public void Extract()
+        {
+            base.AsyncRead();
+        }
+        #endregion
+
+        #region Properties
+        public AddressRange AddressRange
+        {
+            get { return Statistics.AddressRange; }
+        }
+
+        public DbgViewSymbol SymbolView
+        {
+            get { return iDebugView.Symbols; }
+        }
+
+        public Options Options
+        {
+            get { return iOptions; }
+        }
+
+        public HeapStatistics Statistics
+        {
+            get { return iStatistics; }
+        }
+
+        public uint AllocatedCellHeaderSize
+        {
+            get
+            {
+                HeapCell.TBuildType buildType = HeapCell.TBuildType.ERelease;
+                //
+                if ( iDataSource.MetaData.Heap.DebugAllocator )
+                {
+                    buildType = HeapCell.TBuildType.EDebug;
+                }
+                //
+                uint size = HeapCell.AllocatedCellSizeByBuildType( buildType );
+                return size;
+            }
+        }
+
+        public HeapCellArray Data
+        {
+            get { return iData; }
+        }
+
+        public DataSource SourceData
+        {
+            get { return iDataSource; }
+        }
+        #endregion
+
+        #region From AsyncReaderBase
+        protected override void HandleReadStarted()
+        {
+            try
+            {
+                // Prepare view
+                CodeSegDefinitionCollection codeSegs = iDataSource.MetaData.CodeSegments;
+                iDebugView = iDebugEngine.CreateView( "Heap Analyser: " + iDataSource.ThreadName, codeSegs );
+            }
+            finally
+            {
+                base.HandleReadStarted();
+            }
+        }
+
+        protected override void HandleReadCompleted()
+        {
+            base.HandleReadCompleted();
+
+            // Do we have a cell that isn't quite flushed?
+            if ( iCurrentHeapCell != null )
+            {
+                FinaliseCurrentCell();
+            }
+
+            // Finished with the debug view now.
+            iDebugView.Dispose();
+            iDebugView = null;
+        }
+
+        protected override void PerformOperation()
+        {
+            uint baseAddress = iDataSource.MetaData.Heap.HeapBaseAddress;
+            byte[] data = iDataSource.MetaData.HeapData.Data;
+            long size = data.LongLength;
+            iPosition = 0;
+            //
+            while ( iPosition < size )
+            {
+                int amountToProcess = (int) Math.Min( KBatchSize, size - iPosition );
+                if ( amountToProcess > 0 )
+                {
+                    // Extract bytes
+                    byte[] transientData = new byte[ amountToProcess ];
+                    System.Array.Copy( data, iPosition, transientData, 0, amountToProcess );
+                    
+                    // Add them to queue
+                    uint address = (uint) ( baseAddress + iPosition );
+                    iWorkingItemQueue.Add( transientData, address );
+
+                    // Process items in queue
+                    ExecuteStateLoop();
+
+                    // Move to next address
+                    iPosition += amountToProcess;
+                }
+
+                // Report progress
+                NotifyEvent( TEvent.EReadingProgress );
+            }
+        }
+
+        protected override long Size
+        {
+            get { return iDataSource.MetaData.HeapData.Count; }
+        }
+
+        protected override long Position
+        {
+            get { return iPosition; }
+        }
+        #endregion
+
+        #region Internal state enumeration
+        private enum TState
+        {
+            EGettingHeapCellLength = 0,
+            EGettingNestingLevel,
+            EGettingNextFreeCellAddress,
+            EGettingAllocationNumber,
+            EGettingVTable,
+            ESkippingToAddress,
+            ECapturingRawData
+        }
+        #endregion
+
+        #region State handlers
+        private void ExecuteStateLoop()
+        {
+            // Now handle the items that were parsed according to the
+            // current state
+            bool continueProcessing = ( iWorkingItemQueue.Count > 0 );
+            while ( continueProcessing )
+            {
+                switch ( iCurrentState )
+                {
+                case TState.EGettingHeapCellLength:
+                    StateGettingHeapCellLength();
+                    break;
+                case TState.EGettingNextFreeCellAddress:
+                    StateGettingNextFreeCellAddress();
+                    break;
+                case TState.EGettingNestingLevel:
+                    StateGettingNestingLevel();
+                    break;
+                case TState.EGettingAllocationNumber:
+                    StateGettingAllocationNumber();
+                    break;
+                case TState.EGettingVTable:
+                    StateGettingVTable();
+                    break;
+                case TState.ESkippingToAddress:
+                    StateSkippingToAddress();
+                    break;
+                case TState.ECapturingRawData:
+                    StateCapturingRawData();
+                    break;
+                default:
+                    continueProcessing = false;
+                    break;
+                }
+
+                // If we don't have any items left then we must wait
+                // for more data
+                continueProcessing = ( iWorkingItemQueue.Count > 0 );
+            }
+        }
+
+        private void SetNextState( TState aNewState )
+        {
+            iCurrentState = aNewState;
+        }
+
+        private void StateGettingHeapCellLength()
+        {
+            if ( iCurrentHeapCell != null )
+                throw new ArgumentException( "Heap cell should be NULL" );
+
+            RawItem item = iWorkingItemQueue.DequeueHeadItem();
+
+            // Now make a new cell
+            iCurrentHeapCell = new HeapCell();
+            iCurrentHeapCell.Address = item.Address;
+            iCurrentHeapCell.AddRawItemHeader( item );
+            //
+            iState.NextCellAddress = iCurrentHeapCell.Address + iCurrentHeapCell.Length;
+            iState.CurrentAddress = item.Address;
+            //
+            Debug( "[Cell] 0x" + iState.CurrentAddress.ToString( "x8" ) + ", " + item.Data.ToString() + " bytes long, next cell: 0x" + iState.NextCellAddress.ToString( "x8" ) );
+            //
+            TState nextState = TState.EGettingVTable;
+            if ( iState.IsFreeCellAddress() )
+            {
+                // FREE cell
+                iCurrentHeapCell.Type = HeapCell.TType.EFree;
+
+                // Try to get the next free cell address
+                nextState = TState.EGettingNextFreeCellAddress;
+            }
+            else
+            {
+                // ALLOCATED cell
+                if ( HeapCell.IsDebugAllocator )
+                {
+                    nextState = TState.EGettingNestingLevel;
+                }
+            }
+            //
+            SetNextState( nextState );
+        }
+
+        private void StateGettingNextFreeCellAddress()
+        {
+            if ( iCurrentHeapCell == null )
+                throw new ArgumentException( "Heap cell is NULL!" );
+
+            RawItem item = iWorkingItemQueue.DequeueHeadItem();
+            iState.NextFreeCellAddress = item.Data;
+            if ( iState.NextFreeCellAddress > Statistics.AddressRange.Max )
+            {
+                iDataSource.AddError( DataSource.TErrorTypes.EErrorTypeFreeCellAddressOutOfBounds );
+            }
+
+            iCurrentHeapCell.AddRawItemHeader( item );
+            MarkForInspection( item );
+
+            iState.CurrentAddress += RawItem.KSizeOfOneRawItemInBytes;
+            System.Diagnostics.Debug.Assert( iState.CurrentAddress == item.Address );
+            Debug( "  {0x" + iState.CurrentAddress.ToString( "x8" ) + "} - free:        " + item.Data.ToString( "x8" ) );
+
+            // If we're decoding free cell contents, instead
+            // we should try to identify the vTable info from
+            // what remains of the free cell data
+            TState nextState = TState.ECapturingRawData;
+            if ( Options.AttemptToDecodeFreeCellContents )
+            {
+                nextState = TState.EGettingVTable;
+            }
+            SetNextState( nextState );
+        }
+
+        private void StateGettingNestingLevel()
+        {
+            System.Diagnostics.Debug.Assert( HeapCell.IsDebugAllocator );
+            if ( iCurrentHeapCell == null )
+                throw new ArgumentException( "Heap cell is NULL!" );
+            //
+            RawItem item = iWorkingItemQueue.DequeueHeadItem();
+            iCurrentHeapCell.AddRawItemHeader( item );
+            //
+            iState.CurrentAddress += RawItem.KSizeOfOneRawItemInBytes;
+            Debug( "  {0x" + iState.CurrentAddress.ToString( "x8" ) + "} - nexting lev: " + iCurrentHeapCell.NestingLevel );
+            //
+            SetNextState( TState.EGettingAllocationNumber );
+        }
+
+        private void StateGettingAllocationNumber()
+        {
+            System.Diagnostics.Debug.Assert( HeapCell.IsDebugAllocator );
+            if ( iCurrentHeapCell == null )
+                throw new ArgumentException( "Heap cell is NULL!" );
+            //
+            RawItem item = iWorkingItemQueue.DequeueHeadItem();
+            iCurrentHeapCell.AddRawItemHeader( item );
+            //
+            iState.CurrentAddress += 4;
+            System.Diagnostics.Debug.Assert( iState.CurrentAddress == item.Address );
+            Debug( "  {0x" + iState.CurrentAddress.ToString( "x8" ) + "} - alloc num:   " + iCurrentHeapCell.AllocationNumber );
+            //
+            SetNextState( TState.EGettingVTable );
+        }
+
+        private void StateGettingVTable()
+        {
+            if ( iCurrentHeapCell == null )
+                throw new ArgumentException( "Heap cell is NULL!" );
+
+            RawItem item = iWorkingItemQueue.DequeueHeadItem();
+            iState.CurrentAddress += RawItem.KSizeOfOneRawItemInBytes;
+            System.Diagnostics.Debug.Assert( iState.CurrentAddress == item.Address );
+
+            // When dealing with allocated cells, then the vtable is always the first 4 bytes
+            // of the cell.
+            //
+            // When dealing with free cells, then this raw data item might be part of the free
+            // cell (if the free cell length is > 12 bytes) or then it might be part of the
+            // next cell.
+            bool isFromNextCell = ( item.Address == iState.NextCellAddress );
+            //
+            System.Diagnostics.Debug.Assert( iState.CurrentAddress == item.Address );
+            Debug( "  {0x" + iState.CurrentAddress.ToString( "x8" ) + "} - raw:         " + item.Data.ToString( "x8" ) );
+            //
+            if ( isFromNextCell )
+            {
+                // Finalise the cell, i.e. update tracker and store
+                // cell to array.
+                FinaliseCurrentCell();
+
+                // Push the item back again ready for parings
+                iWorkingItemQueue.ReEnqueueItem( item );
+
+                // We were skipping, but we found the first new item.
+                // Save the cell as we've now completely processed it.
+                SetNextState( TState.EGettingHeapCellLength );
+            }
+            else
+            {
+                // Treat this as raw data for this cell
+                AddRawItemToCurrentCell( item );
+
+                // Get next item
+                SetNextState( TState.ECapturingRawData );
+            }
+        }
+
+        private void StateSkippingToAddress()
+        {
+            if ( iCurrentHeapCell != null )
+                throw new ArgumentException( "Heap cell should be NULL" );
+            if ( iState.NextCellAddress <= 0 )
+                throw new ArgumentException( "Start of next cell is <= 0" );
+
+            // Check to see if this item falls within our data range...
+            RawItem item = iWorkingItemQueue.DequeueHeadItem();
+            bool preserveItem = ( item.Address >= iState.NextCellAddress );
+            //
+            iState.CurrentAddress += RawItem.KSizeOfOneRawItemInBytes;
+            System.Diagnostics.Debug.Assert( iState.CurrentAddress == item.Address );
+            Debug( "  {0x" + iState.CurrentAddress.ToString( "x8" ) + "} - skiping:     " + item.Data.ToString( "x8" ) );
+            //
+            if ( preserveItem )
+            {
+                // We were skipping, but we found the first new item
+                SetNextState( TState.EGettingHeapCellLength );
+
+                // Push the item back again ready for parings
+                iWorkingItemQueue.ReEnqueueItem( item );
+            }
+        }
+
+        private void StateCapturingRawData()
+        {
+            if ( iCurrentHeapCell == null )
+                throw new ArgumentException( "Heap cell is NULL!" );
+            if ( iState.NextCellAddress <= 0 )
+                throw new ArgumentException( "Start of next cell is <= 0" );
+
+            // Check to see if this item falls within our data range...
+            RawItem item = iWorkingItemQueue.DequeueHeadItem();
+            bool isFromNextCell = ( item.Address == iState.NextCellAddress );
+            //
+            iState.CurrentAddress += RawItem.KSizeOfOneRawItemInBytes;
+            System.Diagnostics.Debug.Assert( iState.CurrentAddress == item.Address );
+            Debug( "  {0x" + iState.CurrentAddress.ToString( "x8" ) + "} - raw:         " + item.Data.ToString( "x8" ) );
+            //
+            if ( isFromNextCell )
+            {
+                // Finalise the cell, i.e. update tracker and store
+                // cell to array.
+                FinaliseCurrentCell();
+
+                // Push the item back again ready for parings
+                iWorkingItemQueue.ReEnqueueItem( item );
+
+                // We were skipping, but we found the first new item.
+                // Save the cell as we've now completely processed it.
+                SetNextState( TState.EGettingHeapCellLength );
+            }
+            else
+            {
+                // Treat this as raw data for this cell
+                AddRawItemToCurrentCell( item );
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private bool AddressIsWithinHeapBounds( uint aAddress )
+        {
+            bool inBounds = iStatistics.WithinHeapBounds( aAddress );
+            return inBounds;
+        }
+
+        private void AddRawItemToCurrentCell( RawItem aItem )
+        {
+            iCurrentHeapCell.AddRawItem( aItem );
+            MarkForInspection( aItem );
+        }
+
+        private void MarkForInspection( RawItem aItem )
+        {
+            if ( !iAlreadyMarkedForInspection )
+            {
+                // Check this cell later on to see what kind of relationships it has
+                // with other cells.
+                bool isWithinHeap = AddressIsWithinHeapBounds( aItem.Data );
+                if ( isWithinHeap )
+                {
+                    iRelationshipInspector.InspectLater( iCurrentHeapCell );
+                    iAlreadyMarkedForInspection = true;
+                }
+            }
+        }
+
+        private Symbol FindMatchingSymbolAny( uint aAddress )
+        {
+            return FindMatchingSymbol( aAddress, 0, false );
+        }
+        
+        private Symbol FindMatchingSymbolVTable( uint aAddress, uint aLength )
+        {
+            return FindMatchingSymbol( aAddress, aLength, true );
+        }
+
+        private Symbol FindMatchingSymbol( uint aAddress, uint aLength, bool aMustBeVTable )
+        {
+            SymbolCollection collection;
+            Symbol symbol = iDebugView.Symbols.Lookup( aAddress, out collection );
+            //
+            if ( symbol != null )
+            {
+                // If we just hit a "placeholder" symbol, then let's replace it with
+                // something more unique so that we can better track statistics for these
+                // binaries which we don't have proper symbolics for.
+                if ( symbol.IsDefault && aLength > 0 )
+                {
+                    Symbol temp = Symbol.NewDefault();
+                    temp.OffsetAddress = aAddress;
+                    temp.Size = aLength;                    // This is a kludge because we can never know 
+                    temp.Object = symbol.Object;            // how big the symbol was if we don't have symbolic info
+                    symbol = temp;
+                    System.Diagnostics.Debug.WriteLine( string.Format( "[IsUnknown]  vTable: 0x{0:x8}, len: {1}", aAddress, aLength ) );
+                }
+                else if ( aMustBeVTable && !symbol.IsVTable )
+                {
+                    // We did find a symbol, but it looks like a function or some other address
+                    // which is not type-info related. Do not associated with symbol in this situation.
+                    System.Diagnostics.Debug.WriteLine( string.Format( "[Not vTable]  vTable: 0x{0:x8}, len: {1}, sym: {2}", aAddress, aLength, symbol.ToString() ) );
+                    symbol = null;
+                }
+            }
+            else if ( collection != null )
+            {
+                System.Diagnostics.Debug.WriteLine( string.Format( "[No symbol]  vTable: 0x{0:x8}, len: {1}, collection: {2}", aAddress, aLength, collection.FileName.FileNameInHost ) );
+            }
+            //
+            return symbol;
+        }
+
+        private void FinaliseCurrentCell()
+        {
+            HeapCell cell = iCurrentHeapCell;
+
+            // Zero out cell. We'll make a new one in
+            // StateGettingHeapCellLength()
+            iCurrentHeapCell = null;
+
+            // Set index
+            cell.Index = (uint) iData.Count;
+
+            // If we have just finished a cell, make sure we update
+            // the statistics tracker with that cell's data.
+            iData.Add( cell );
+
+            // Set this back to false since we're moving to a new cell
+            iAlreadyMarkedForInspection = false;
+
+            // Finish rest of construction
+            DoFinaliseCell( cell );
+        }
+
+        private void DoFinaliseCell( object aCell )
+        {
+            HeapCell cell = (HeapCell) aCell;
+
+            // Do symbolic lookups
+            Debug( "  {0x" + iState.CurrentAddress.ToString( "x8" ) + "} - vTable:      " + cell.PossibleVTableAddress.ToString( "x8" ) );
+            cell.Symbol = FindMatchingSymbolVTable( cell.PossibleVTableAddress, cell.Length );
+
+            // If the MemSpy data includes stack-based function addresses stored instead
+            // of nesting level, then we can also try to find a matching symbol.
+            if ( SourceData.MetaData.Heap.IsDebugAllocatorWithStoredStackAddresses )
+            {
+                cell.Symbol2 = FindMatchingSymbolAny( cell.NestingLevel );
+                cell.Symbol3 = FindMatchingSymbolAny( cell.AllocationNumber );
+            }
+
+            // Cell is now finished.
+            cell.ConstructionComplete( iStatistics );
+
+            // Update stats - do this after finalising the cell
+            // as the act of finalisation may result in the
+            // cell being tagged as a descriptor. This must be done
+            // prior to the stats update, or else we won't treat
+            // any cell as a descriptor!
+            lock ( iStatistics )
+            {
+                iStatistics.HandleCell( cell );
+            }
+        }
+
+        private void Debug( string aMessage )
+        {
+            System.Diagnostics.Debug.WriteLineIf( iState.DebugEnabled, aMessage );
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KBatchSize = 1024;
+        #endregion
+
+        #region Data members
+        private readonly DataSource iDataSource;
+        private readonly Options iOptions;
+        private readonly RelationshipInspector iRelationshipInspector;
+        private readonly HeapStatistics iStatistics;
+        private readonly HeapCellArray iData;
+        private readonly ExtractionState iState;
+        private readonly DbgEngine iDebugEngine;
+        private DbgEngineView iDebugView = null;
+        private TState iCurrentState;
+        private HeapCell iCurrentHeapCell;
+        private RawItemQueue iWorkingItemQueue = new RawItemQueue();
+        private long iPosition = 0;
+        private bool iAlreadyMarkedForInspection = false;
+        #endregion
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/RawItemPrecursor.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Reconstructor.RHeap.Extractor
+{
+    internal class RawItemPrecursor
+    {
+        #region Constructors & destructor
+        public RawItemPrecursor()
+        {
+        }
+        #endregion
+
+        #region API
+        public void ConvertBytesToCharacters()
+        {
+            for ( int i = 0; i <= 3; i++ )
+            {
+                uint b = Bytes[ i ];
+                char c = System.Convert.ToChar( b );
+                //
+                SetCharValue( c, i );
+            }
+        }
+
+        public void SetCharValue( char aValue, int aIndex )
+        {
+            if ( aIndex < 0 || aIndex > 3 )
+            {
+                throw new ArgumentException( "Invalid index" );
+            }
+
+            int charCode = (int) aValue;
+            if ( charCode >= 0x20 && charCode < 0x7F )
+            {
+                Chars[ aIndex ] = aValue;
+            }
+            else
+            {
+                Chars[ aIndex ] = '.';
+            }
+        }
+        #endregion
+
+        #region Properties
+        public uint[] Bytes 
+        {
+            get { return iBytes; }
+        }
+
+        public uint ByteValue
+        {
+            get
+            {
+                uint ret = 0;
+                //
+                ret += ( iBytes[ 0 ] );
+                ret += ( iBytes[ 1 ] << 8 );
+                ret += ( iBytes[ 2 ] << 16 );
+                ret += ( iBytes[ 3 ] << 24 );
+                //
+                return ret;
+            }
+        }
+
+        public uint ByteValueReversed
+        {
+            get
+            {
+                uint ret = 0;
+                //
+                ret += ( iBytes[ 3 ] );
+                ret += ( iBytes[ 2 ] << 8 );
+                ret += ( iBytes[ 1 ] << 16 );
+                ret += ( iBytes[ 0 ] << 24 );
+                //
+                return ret;
+            }
+        }
+
+        public char[] Chars
+        {
+            get { return iChars; }
+            set { iChars = value; }
+        }
+
+        public string CharValue
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                //
+                foreach ( char c in iChars )
+                {
+                    ret.Append( c );
+                }
+                //
+                return ret.ToString();
+            }
+        }
+
+        public string CharValueReversed
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                //
+                foreach ( char c in iChars )
+                {
+                    ret.Insert( 0, c );
+                }
+                //
+                return ret.ToString();
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Data members
+        private uint[] iBytes = new uint[] { 0, 0, 0, 0 };
+        private char[] iChars = new char[] { '.', '.', '.', '.' };
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Reconstructor/RHeap/Extractor/RawItemQueue.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,212 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils;
+using SymbianUtils.RawItems;
+
+namespace HeapLib.Reconstructor.RHeap.Extractor
+{
+    internal class RawItemQueue
+    {
+        #region Constructors & destructor
+        public RawItemQueue()
+        {
+            iItems = new List<RawItem>( 10 * 1000 );
+        }
+        #endregion
+
+        #region API
+        public void Add( byte[] aData, uint aAddress )
+        {
+            int length = aData.Length;
+            if ( length % 4 != 0 )
+            {
+                throw new ArgumentException( "Data is not a multiple of 4 bytes" );
+            }
+
+            for ( int i = 0; i < length; i += 4 )
+            {
+                // Make helper
+                RawItemPrecursor prec = new RawItemPrecursor();
+                prec.Bytes[ 3 ] = aData[ i + 0 ];
+                prec.Bytes[ 2 ] = aData[ i + 1 ];
+                prec.Bytes[ 1 ] = aData[ i + 2 ];
+                prec.Bytes[ 0 ] = aData[ i + 3 ];
+                prec.ConvertBytesToCharacters();
+
+                // Make final item
+                RawItem ret = new RawItem();
+                ret.Address = (uint) ( aAddress + i );
+                ret.OriginalData = prec.ByteValue;
+                ret.Data = prec.ByteValueReversed;
+                ret.CharacterisedData = prec.CharValue;
+                //
+                iItems.Add( ret );
+            }
+        }
+
+        public void ReEnqueueItem( RawItem aItem )
+        {
+            iItems.Insert( 0, aItem );
+        }
+
+        public RawItem DequeueHeadItem()
+        {
+            RawItem head = iItems[ 0 ];
+            iItems.RemoveAt( 0 );
+            return head;
+        }
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iItems.Count; }
+        }
+        #endregion
+
+        #region Internal methods
+        private static RawItemPrecursor CreatePrecursor( Queue<Capture> aDataQ, Queue<char> aCharQ )
+        {
+            System.Diagnostics.Debug.Assert( aDataQ.Count >= 4 && aCharQ.Count >= 4 );
+            //
+            RawItemPrecursor ret = new RawItemPrecursor();
+
+            // Get data
+            ret.Bytes[ 3 ] = ConvertCaptureToByteValue( aDataQ.Dequeue() );
+            ret.Bytes[ 2 ] = ConvertCaptureToByteValue( aDataQ.Dequeue() );
+            ret.Bytes[ 1 ] = ConvertCaptureToByteValue( aDataQ.Dequeue() );
+            ret.Bytes[ 0 ] = ConvertCaptureToByteValue( aDataQ.Dequeue() );
+            
+            // Get characters
+            ret.Chars[ 0 ] = aCharQ.Dequeue();
+            ret.Chars[ 1 ] = aCharQ.Dequeue();
+            ret.Chars[ 2 ] = aCharQ.Dequeue();
+            ret.Chars[ 3 ] = aCharQ.Dequeue();
+            
+            return ret;
+        }
+
+        private static uint ConvertCaptureToByteValue( Capture aCapture )
+        {
+            uint ret = System.Convert.ToUInt32( aCapture.Value.Trim(), KBaseHex );
+            return ret;
+        }
+
+        private static uint GetValueFromByteArray( uint[] aArray )
+        {
+            uint ret = aArray[ 0 ];
+            //
+            ret += ( aArray[ 1 ] << 8 );
+            ret += ( aArray[ 2 ] << 16 );
+            ret += ( aArray[ 3 ] << 24 );
+            //
+            return ret;
+        }
+
+        private static uint GetReversedValueFromByteArray( uint[] aArray )
+        {
+            // Get original bytes
+            uint b1 = aArray[ 0 ];
+            uint b2 = aArray[ 1 ];
+            uint b3 = aArray[ 2 ];
+            uint b4 = aArray[ 3 ];
+
+            // Build reversed value
+            uint ret = b4;
+            ret += ( b3 << 8 );
+            ret += ( b2 << 16 );
+            ret += ( b1 << 24 );
+            //
+            return ret;
+        }
+
+        private static string GetCharacterisedDataFromCharacterQueue( Queue<char> aCharQ )
+        {
+            char[] chars = { '.', '.', '.', '.' };
+            //
+            if ( aCharQ.Count >= 4 )
+            {
+                char c1 = aCharQ.Dequeue();
+                char c2 = aCharQ.Dequeue();
+                char c3 = aCharQ.Dequeue();
+                char c4 = aCharQ.Dequeue();
+                //
+                chars[ 0 ] = c1;
+                chars[ 1 ] = c2;
+                chars[ 2 ] = c3;
+                chars[ 3 ] = c4;
+            }
+
+            // It's very dumb that this is the only way to get a char array into a string.
+            StringBuilder ret = new StringBuilder();
+            foreach( char c in chars )
+            {
+                ret.Append( c );
+            }
+            return ret.ToString();
+        }
+
+        private static RawItem CreateRawItem( uint aAddress, Queue<Capture> aDataQ, Queue<char> aCharQ )
+        {
+            RawItemPrecursor precusor = CreatePrecursor( aDataQ, aCharQ );
+            //
+            RawItem ret = new RawItem();
+            ret.Address = aAddress;
+            ret.OriginalData = precusor.ByteValue;
+            ret.Data = precusor.ByteValueReversed;
+            ret.CharacterisedData = precusor.CharValueReversed;
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KBaseHex = 16;
+        #endregion
+
+        #region Data members
+        private readonly List<RawItem> iItems;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapLib.Relationships
+{
+    public class RelationshipCollection : IEnumerable<RelationshipInfo>
+    {
+        #region Constructors & destructors
+        internal RelationshipCollection( Dictionary<uint, RelationshipInfo> aItems )
+        {
+            iItems = aItems;
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        public int Count
+        {
+            get { return iItems.Count; }
+        }
+        #endregion
+
+        #region IEnumerable<RelationshipInfo> Members
+        IEnumerator<RelationshipInfo> IEnumerable<RelationshipInfo>.GetEnumerator()
+        {
+            return iItems.Values.GetEnumerator();
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return iItems.Values.GetEnumerator();
+        }
+        #endregion
+
+        #region Data members
+        private readonly Dictionary<uint, RelationshipInfo> iItems;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipDictionary.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using SymbianUtils.RawItems;
+using SymbianUtils.TextUtilities.Readers.Types.Array;
+
+namespace HeapLib.Relationships
+{
+    internal class RelationshipDictionary : IEnumerable<HeapCell>
+    {
+        #region Constructors & destructor
+        public RelationshipDictionary()
+        {
+        }
+        #endregion
+
+        #region API
+        public bool Contains( HeapCell aCell )
+        {
+            uint address = aCell.Address;
+            bool ret = iDictionary.ContainsKey( address );
+            return ret;
+        }
+
+        public void Add( HeapCell aCell )
+        {
+            bool added = Contains( aCell );
+            if ( !added )
+            {
+                iDictionary.Add( aCell.Address, aCell );
+            }
+        }
+
+        public void Clear()
+        {
+            iDictionary.Clear();
+        }
+        #endregion
+
+        #region Properties
+        public long Count
+        {
+            get { return iDictionary.Count; }
+        }
+        #endregion
+
+        #region IEnumerable<HeapCell> Members
+        public IEnumerator<HeapCell> GetEnumerator()
+        {
+            foreach ( KeyValuePair<uint, HeapCell> kvp in iDictionary )
+            {
+                yield return kvp.Value;
+            }
+        }
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            IEnumerator<HeapCell> self = (IEnumerator<HeapCell>) this;
+            return self;
+        }
+        #endregion
+
+        #region Data members
+        private SortedDictionary<uint, HeapCell> iDictionary = new SortedDictionary<uint, HeapCell>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using SymbianUtils.RawItems;
+using SymbianUtils.Utilities;
+using HeapLib.Cells;
+
+namespace HeapLib.Relationships
+{
+    public class RelationshipInfo
+    {
+        #region Constructors & destructor
+        public RelationshipInfo()
+        {
+        }
+
+        public RelationshipInfo( HeapCell aFromCell, RawItem aRawItemInFromCell, HeapCell aToCell )
+        {
+            FromCell = aFromCell;
+            FromCellRawItem = aRawItemInFromCell;
+            ToCell = aToCell;
+        }
+        #endregion
+
+        #region Properties
+        // <summary>
+        //  The cell which contains the emebdded reference
+        // </summary>
+        public HeapCell FromCell
+        {
+            get { return iFromCell; }
+            set { iFromCell = value; }
+        }
+
+        // <summary>
+        // The cell to which the embedded reference points
+        // </summary>
+        public HeapCell ToCell
+        {
+            get { return iToCell; }
+            set { iToCell = value; }
+        }
+
+        // <summary>
+        // The raw item in the 'from' cell that points to
+        // the 'to' cell.
+        // </summary>
+        public RawItem FromCellRawItem
+        {
+            get { return iFromCellRawItem; }
+            set { iFromCellRawItem = value; }
+        }
+
+        // <summary>
+        // A clean link, is one that goes from within 'from cell' to
+        // the very start of 'to cell's' payload section
+        // </summary>
+        public bool IsCleanLink
+        {
+            get
+            {
+                RawItem rawItemInFromCell = FromCellRawItem;
+                uint exactMatchAddress = rawItemInFromCell.Data - HeapCell.AllocatedCellHeaderSize;
+                uint destinationAddress = ToCell.Address;
+                bool cleanMatch = ( destinationAddress == exactMatchAddress );
+                //
+                return cleanMatch;
+            }
+        }
+
+        // <summary>
+        // This is the offset, in bytes into the 'from' cell that contains
+        // the raw item that points to the 'to' cell.
+        // </summary>
+        public uint LinkAddressOffsetWithinFromCell
+        {
+            get
+            {
+                uint ret = FromCellRawItem.Address - FromCell.Address;
+                return ret;
+            }
+        }
+        #endregion
+
+        #region From System.Object
+        public override string ToString()
+        {
+            return ToCell.ToStringExtended();
+        }
+        #endregion
+
+        #region Data members
+        private HeapCell iFromCell = new HeapCell();
+        private HeapCell iToCell = new HeapCell();
+        private RawItem iFromCellRawItem = new RawItem();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipInspector.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,180 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using SymbianUtils.RawItems;
+using SymbianUtils.TextUtilities.Readers.Types.Array;
+
+namespace HeapLib.Relationships
+{
+    internal class RelationshipInspector : AsyncEnumerableReader<HeapCell>
+	{
+		#region Constructors & destructor
+		public RelationshipInspector( HeapCellArray aEntries, HeapStatistics aStats )
+            : base( null )
+		{
+			iEntries = aEntries;
+            iStats = aStats;
+		}
+		#endregion
+
+		#region API
+		public void InspectLater( HeapCell aCell )
+		{
+            iDictionary.Add( aCell );
+		}
+
+		public void Inspect()
+		{
+            iResultCache.Clear();
+            base.Setup( iDictionary.Count, iDictionary.GetEnumerator() );
+            base.AsyncRead();
+		}
+		#endregion
+
+        #region From AsyncEnumerableReader
+        protected override void HandleObject( HeapCell aObject, long aIndex, long aCount )
+        {
+            CheckForCrossReferences( aObject );
+        }
+
+        protected override void HandleReadCompleted()
+        {
+            iResultCache.Clear();
+            iDictionary.Clear();
+            base.HandleReadCompleted();
+        }
+        #endregion
+
+        #region Internal methods
+        private void CheckForCrossReferences( HeapCell aCell )
+		{
+            // If we're dealing with a free cell, then set up the free cell 
+            // linked list.
+            if ( aCell.Type == HeapCell.TType.EFree && aCell.HeaderRawItems.Count == 2 )
+            {
+                uint length = aCell.HeaderRawItems[ 0 ].Data;
+                uint address = aCell.HeaderRawItems[ 1 ].Data;
+                //
+                LocateMatch( aCell, aCell.HeaderRawItems[ 1 ], 0 );
+            }
+
+            // For all other cells, identify other links
+			foreach( RawItem rawItem in aCell )
+			{
+                uint headerOffset = HeapCell.CellHeaderSize( aCell.Type );
+                LocateMatch( aCell, rawItem, headerOffset );
+			}
+        }
+
+        private void LocateMatch( HeapCell aCell, RawItem aItem, uint aHeaderOffset )
+        {
+            RelationshipManager linkManager = aCell.RelationshipManager;
+
+            // Now check if this address exactly matches a heap cell
+            if ( iStats.WithinHeapBounds( aItem.Data ) )
+            {
+                // The address of another object within the heap
+                // is always the address of the object within the payload
+                // section of a heap cell. Therefore in order to find the
+                // corresponding heap cell address, we must subtract the
+                // heap cell header length from the starting address.
+                //
+                // In other words, the rawItem.Data value points to a payload address.
+                // However, our cell search function (CellByExactAddress) works in 
+                // terms of a heap cell address. The heap cell includes [header + payload].
+                //
+                // In order to convert the object address into a heap cell address,
+                // we must subtract the allocated heap cell header size from the 
+                // raw address.
+                uint exactMatchAddress = aItem.Data - aHeaderOffset;
+
+                HeapCell cell = iEntries.CellByExactAddress( exactMatchAddress );
+                if ( cell != null && cell.Address != aCell.Address )
+                {
+                    linkManager.AddEmbeddedReferenceTo( aItem, cell );
+                }
+                else if ( cell == null )
+                {
+                    uint partialMatchAddress = aItem.Data;
+
+                    // Didn't find an exact match, but we might find that this address
+                    // points to part way through another heap cell.
+                    cell = Lookup( partialMatchAddress );
+                    if ( cell != null && cell.Address != aCell.Address )
+                    {
+                        // It also has to point to the payload
+                        HeapCell.TRegion region = cell.RegionForAddress( partialMatchAddress );
+                        if ( region == HeapCell.TRegion.EPayload )
+                        {
+                            linkManager.AddEmbeddedReferenceTo( aItem, cell );
+                        }
+                    }
+                }
+            }
+        }
+
+        private HeapCell Lookup( uint aAddress )
+        {
+            HeapCell ret = null;
+            //
+            if ( !iResultCache.TryGetValue( aAddress, out ret ) )
+            {
+                ret = iEntries.CellByAddress( aAddress );
+                if ( ret != null )
+                {
+                    iResultCache.Add( aAddress, ret );
+                }
+            }
+            //
+            return ret;
+        }
+		#endregion
+
+        #region Data members
+        private readonly HeapCellArray iEntries;
+        private readonly HeapStatistics iStats;
+        private RelationshipDictionary iDictionary = new RelationshipDictionary();
+        private Dictionary<uint, HeapCell> iResultCache = new Dictionary<uint, HeapCell>();
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Relationships/RelationshipManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+using SymbianUtils.RawItems;
+using SymbianUtils.Utilities;
+using HeapLib.Array;
+using HeapLib.Cells;
+
+namespace HeapLib.Relationships
+{
+    public class RelationshipManager
+    {
+        #region Constructors & destructor
+        internal RelationshipManager( HeapCell aCell )
+        {
+            iCell = aCell;
+        }
+        #endregion
+
+        #region API
+        internal void AddReferencedBy( HeapCell aCell )
+        {
+            iReferencedBy.Add( aCell );
+        }
+
+        internal void AddEmbeddedReferenceTo( RawItem aRawItemInThisCell, HeapCell aToCell )
+        {
+            System.Diagnostics.Debug.Assert( aRawItemInThisCell.Tag == null );
+
+            if ( ContainsEmbeddedReference( aToCell ) == false )
+            {
+                // Make reference description
+                RelationshipInfo referenceTo = new RelationshipInfo( iCell, aRawItemInThisCell, aToCell );
+
+                // Set up relationship between a raw item in this cell and
+                // the specified other cell.
+                aRawItemInThisCell.Tag = referenceTo;
+
+                // This cell now contains a reference to the other cell.
+                iEmbeddedReferencesTo.Add( aToCell.Address, referenceTo );
+
+                // aAnotherCell has been referenced by 'me'
+                aToCell.RelationshipManager.ReferencedBy.Add( Parent );
+            }
+            else
+            {
+                //System.Diagnostics.Debug.WriteLine( "PREVENTING CYCLIC LINK - Cell: 0x" + aCell.Address.ToString("x8") + " already contains a linkRef to: 0x" + cell.Address.ToString("x8") );
+            }
+        }
+
+        public HeapCell EmbeddedReference( uint aAddress )
+        {
+            HeapCell ret = null;
+            //
+            if ( ContainsEmbeddedReference( aAddress ) )
+            {
+                RelationshipInfo info = iEmbeddedReferencesTo[ aAddress ];
+                ret = info.ToCell;
+            }
+            //
+            return ret;
+        }
+
+        public bool ContainsEmbeddedReference( uint aAddress )
+        {
+            bool found = iEmbeddedReferencesTo.ContainsKey( aAddress );
+            return found;
+        }
+
+        public bool ContainsEmbeddedReference( HeapCell aCell )
+        {
+            return ContainsEmbeddedReference( aCell.Address );
+        }
+        #endregion
+
+        #region Properties
+        public HeapCell Parent
+        {
+            get { return iCell; }
+        }
+
+        // <summary>
+        // The array of cells that this particular cell contains references
+        // to within it's raw item array (i.e. it's payload section).
+        // </summary>
+        public RelationshipCollection EmbeddedReferencesTo
+        {
+            get { return new RelationshipCollection( iEmbeddedReferencesTo ); }
+        }
+
+        // <summary>
+        // The array of cells that are referencing this cell, i.e. the
+        // list of other cells that contain addresses that point to 'me'
+        // </summary>
+        public HeapCellArrayBase ReferencedBy
+        {
+            get { return iReferencedBy; }
+        }
+
+        public HeapCell ReferencedByUnique
+        {
+            get
+            {
+                if (iReferencedBy.Count == 1)
+                    return iReferencedBy[0];
+
+
+                if (iReferencedBy.Count > 1)
+                {
+                    HeapCell firstHeapCell = iReferencedBy[0];
+
+                    for (int i = 1; i < iReferencedBy.Count; i++)
+                    {
+                        if (!firstHeapCell.Equals(iReferencedBy[i]))
+                        {
+                            return null;
+                        }
+                    }
+                    return iReferencedBy[0];
+                }
+
+                return null;
+            }
+        }
+        
+        public uint PayloadLengthOfEmbeddedCells
+        {
+            get
+            {
+                uint ret = 0;
+                //
+                foreach ( RelationshipInfo info in EmbeddedReferencesTo )
+                {
+                    ret += info.ToCell.PayloadLength;
+                }
+                //
+                return ret;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCell iCell;
+        private Dictionary<uint, RelationshipInfo> iEmbeddedReferencesTo = new Dictionary<uint, RelationshipInfo>();
+        private HeapCellArrayUnsorted iReferencedBy = new HeapCellArrayUnsorted();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Distribution/HeapCellSizeDistribution.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+
+namespace HeapLib.Statistics.Distribution
+{
+	public class HeapCellSizeDistribution : IEnumerable
+	{
+		#region Constructors & destructor
+		public HeapCellSizeDistribution()
+		{
+		}
+		#endregion
+
+		#region API
+		public void Register( uint aCellLength )
+		{
+			if	( !iDistributionCounts.ContainsKey( aCellLength ) )
+			{
+				iDistributionCounts.Add( aCellLength, 1u );
+			}
+			else
+			{
+                object len = iDistributionCounts[ aCellLength ];
+				uint val = (uint) len;
+				iDistributionCounts[ aCellLength ] = val + 1;
+			}
+		}
+		#endregion
+
+		#region Properties
+        public uint Total
+        {
+            get
+            {
+                uint ret = 0;
+                //
+                foreach ( DictionaryEntry entry in this )
+                {
+                    uint size = (uint) entry.Key;
+                    uint count = (uint) entry.Value;
+                    //
+                    ret += ( size * count );
+                }
+                //
+                return ret;
+            }
+        }
+
+        public int Count
+        {
+            get { return iDistributionCounts.Count; }
+        }
+
+        public uint this[ int aIndex ]
+        {
+            get
+            {
+                uint ret = (uint) iDistributionCounts.GetByIndex( aIndex );
+                return ret;
+            }
+        }
+		#endregion
+
+        #region IEnumerable Members
+        public IEnumerator GetEnumerator()
+        {
+            return iDistributionCounts.GetEnumerator();
+        }
+        #endregion
+
+		#region Data members
+		private SortedList iDistributionCounts = new SortedList();
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Distribution/HeapCellSizeDistributionEnumerator.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+
+namespace HeapLib.Statistics.Distribution
+{
+    internal class HeapCellSizeDistributionEnumerator : IEnumerator
+    {
+        #region Constructors & destructor
+        public HeapCellSizeDistributionEnumerator( HeapCellSizeDistribution aCollection )
+        {
+            iCollection = aCollection;
+        }
+        #endregion
+
+        #region IEnumerator Members
+        void IEnumerator.Reset()
+        {
+            iCurrentIndex = -1;
+        }
+
+        object IEnumerator.Current
+        {
+            get
+            {
+                return iCollection[ iCurrentIndex ];
+            }
+        }
+
+        bool IEnumerator.MoveNext()
+        {
+            return ( ++iCurrentIndex < iCollection.Count );
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCellSizeDistribution iCollection;
+        private int iCurrentIndex = -1;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/HeapStatistics.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,209 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics.Types;
+using HeapLib.Statistics.Distribution;
+using SymbianUtils.Range;
+
+namespace HeapLib.Statistics
+{
+	public class HeapStatistics
+	{
+        #region Constructors & destructor
+		public HeapStatistics()
+		{
+		}
+        #endregion
+
+        #region Cell handler
+        internal void HandleCell( HeapCell aCell )
+        {
+            HandleCellCommon( aCell );
+            //
+            switch( aCell.Type )
+            {
+            case HeapCell.TType.EAllocated:
+                StatsAllocated.HandleCell( aCell );
+                break;
+            case HeapCell.TType.EFree:
+                StatsFree.HandleCell( aCell );
+                break;
+            default:
+                break;
+            }
+        }
+
+        internal void Finalise( HeapCellArrayBase aArray )
+        {
+            iStatsAllocated.Finalise( aArray );
+            iStatsAllocated.Finalise( aArray );
+        }
+        #endregion
+
+        #region API
+        public void Clear()
+        {
+            iHeapAddressRange = new AddressRange();
+            iStatsAllocated = new HeapStatisticsAllocated();
+            iStatsFree = new HeapStatisticsFree();
+            iDistributionCommon = new HeapCellSizeDistribution();
+        }
+
+        public bool WithinHeapBounds( uint aAddress )
+        {
+            bool ret = iHeapAddressRange.Contains( aAddress );
+            return ret;
+        }
+
+        public float CellLengthAsHeapPercentage( HeapCell aCell )
+        {
+            float ret = CellLengthAsHeapPercentage( aCell.Length );
+            return ret;
+        }
+
+        public float CellLengthAsHeapPercentage( long aLength )
+        {
+            float ret = (float) aLength / (float) SizeTotal;
+            return ret * 100.0f;
+        }
+
+        public float CellLengthAsTypePercentage( HeapCell aCell )
+        {
+            float ret = 0.0f;
+            //
+            switch( aCell.Type )
+            {
+            case HeapCell.TType.EAllocated:
+                ret = StatsAllocated.CellLengthAsTypePercentage( aCell );
+                break;
+            case HeapCell.TType.EFree:
+                ret = StatsFree.CellLengthAsTypePercentage( aCell );
+                break;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public uint HeapBaseAddress
+        {
+            get { return (uint) iHeapAddressRange.Min; }
+            set
+            {
+                iHeapAddressRange.UpdateMin( value );
+            }
+        }
+
+        public uint HeapSize
+        {
+            get
+            {
+                uint val = HeapAddressEnd - HeapAddressStart;
+                return val;
+            }
+            set
+            {
+                uint maxAddress = HeapBaseAddress + value;
+                iHeapAddressRange.UpdateMax( maxAddress );
+            }
+        }
+
+        public long SizeTotal
+        {
+            get { return StatsAllocated.TypeSize + StatsFree.TypeSize; }
+        }
+
+        public long SizeTotalHeader
+        {
+            get { return StatsAllocated.TypeSizeHeader + StatsFree.TypeSizeHeader; }
+        }
+
+        public long SizeTotalPayload
+        {
+            get { return StatsAllocated.TypeSizePayload + StatsFree.TypeSizePayload; }
+        }
+
+        public AddressRange AddressRange
+        {
+            get { return iHeapAddressRange; }
+        }
+
+        public uint HeapAddressStart
+        {
+            get { return (uint) iHeapAddressRange.Min; }
+        }
+
+        public uint HeapAddressEnd
+        {
+            get { return (uint) iHeapAddressRange.Max; }
+        }
+
+        public HeapStatisticsFree StatsFree
+        {
+            get { return iStatsFree; }
+        }
+
+        public HeapStatisticsAllocated StatsAllocated
+        {
+            get { return iStatsAllocated; }
+        }
+
+        public HeapCellSizeDistribution DistributionCommon
+        {
+            get { return iDistributionCommon; }
+        }
+        #endregion
+
+        #region Internal methods
+        private void HandleCellCommon( HeapCell aCell )
+        {
+            iDistributionCommon.Register( aCell.Length );
+        }
+        #endregion
+
+        #region Data members
+        private AddressRange iHeapAddressRange = new AddressRange();
+        private HeapStatisticsFree iStatsFree = new HeapStatisticsFree();
+        private HeapStatisticsAllocated iStatsAllocated = new HeapStatisticsAllocated();
+        private HeapCellSizeDistribution iDistributionCommon = new HeapCellSizeDistribution();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/Base/TrackingCollectionBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,207 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils.Collections;
+using SymbianStructuresLib.Debug.Symbols;
+using HeapLib.Cells;
+
+namespace HeapLib.Statistics.Tracking.Base
+{
+	public abstract class TrackingCollectionBase : IEnumerable<TrackingInfo>
+	{
+        #region Constructors & destructor
+	    protected TrackingCollectionBase()
+		{
+        }
+        #endregion
+
+        #region API
+        internal abstract void Track( HeapCell aCell );
+
+        public virtual void Remove( TrackingInfo aItem )
+        {
+            throw new NotSupportedException();
+        }
+        #endregion
+
+        #region Sorting
+        public void SortByAllocatedMemory()
+        {
+            TrackingInfoSortByAssociatedMemory comparer = new TrackingInfoSortByAssociatedMemory( false );
+            Sort( comparer );
+        }
+
+        public void SortByCount()
+        {
+            TrackingInfoSortByCount comparer = new TrackingInfoSortByCount( false );
+            Sort( comparer );
+        }
+
+        public void SortByAssociatedCellCount()
+        {
+            TrackingInfoSortByAssociatedCellCount comparer = new TrackingInfoSortByAssociatedCellCount( false );
+            Sort( comparer );
+        }
+
+        public void SortBySymbolName()
+        {
+            TrackingInfoSortBySymbolName comparer = new TrackingInfoSortBySymbolName( false );
+            Sort( comparer );
+        }
+
+        public void SortByPayloadLength()
+        {
+            TrackingInfoSortByPayloadLength comparer = new TrackingInfoSortByPayloadLength( false );
+            Sort( comparer );
+        }
+        #endregion
+
+        #region Properties
+        public abstract int Count
+        {
+            get;
+        }
+ 
+        public long TypeSize
+        {
+            get { return iTypeSize; }
+        }
+
+        public long CellMatchCount
+        {
+            get { return iCellMatchCount; }
+        }
+
+        public TrackingInfo EntryWithSmallestCount
+        {
+            get
+            {
+                TrackingInfo ret = null;
+                //
+                foreach ( TrackingInfo entry in this )
+                {
+                    if ( ret == null || entry.Count < ret.Count )
+                    {
+                        ret = entry;
+                    }
+                }
+                //
+                return ret;
+            }
+        }
+
+        public TrackingInfo EntryWithLargestCount
+        {
+            get
+            {
+                TrackingInfo ret = null;
+                //
+                foreach ( TrackingInfo entry in this )
+                {
+                    if ( ret == null || entry.Count > ret.Count )
+                    {
+                        ret = entry;
+                    }
+                }
+                //
+                return ret;
+            }
+        }
+
+        public abstract TrackingInfo this[ int aIndex ]
+        {
+            get;
+        }
+
+        public virtual TrackingInfo this[ Symbol aSymbol ]
+        {
+            get
+            {
+                throw new NotSupportedException();
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        protected abstract void Sort( IComparer<TrackingInfo> aComparer );
+
+        protected void HandleCell( HeapCell aCell )
+        {
+            // Keep track of the total size of cells that
+            // actually have symbols associated with them
+            if  ( aCell.Symbol != null )
+            {
+                iTypeSize += aCell.Length;
+
+                // Every cell we see that matches goes towards our 
+                // tracking count.
+                ++iCellMatchCount;
+            }
+        }
+        #endregion
+
+        #region IEnumerable Members
+        IEnumerator<TrackingInfo> IEnumerable<TrackingInfo>.GetEnumerator()
+        {
+            int count = this.Count;
+            for ( int i = 0; i < count; i++ )
+            {
+                TrackingInfo entry = this[ i ];
+                yield return entry;
+            }
+        }
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            int count = this.Count;
+            for ( int i = 0; i < count; i++ )
+            {
+                TrackingInfo entry = this[ i ];
+                yield return entry;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private long iTypeSize = 0;
+        private long iCellMatchCount = 0;
+        #endregion
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/Base/TrackingComparisonObjects.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,203 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+
+namespace HeapLib.Statistics.Tracking.Base
+{
+    public abstract class TrackingComparisonBase : IComparer<TrackingInfo>
+    {
+        #region Constructors & destructor
+        public TrackingComparisonBase( bool aAscending )
+        {
+            iAscending = aAscending;
+        }
+        #endregion
+
+        #region IComparer Members
+        public int Compare( TrackingInfo aLeft, TrackingInfo aRight )
+        {
+            int ret = CompareTrackingInfo( aLeft, aRight );
+            //
+            if	( iAscending == false )
+            {
+                ret *= -1;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region New framework methods
+        public abstract int CompareTrackingInfo( TrackingInfo aLeft, TrackingInfo aRight );
+        #endregion
+
+        #region Data members
+        private readonly bool iAscending;
+        #endregion
+    }
+
+    public class TrackingInfoSortBySymbolName : TrackingComparisonBase
+    {
+        #region Constructors & destructor
+        public TrackingInfoSortBySymbolName( bool aAscending )
+            : base( aAscending )
+        {
+        }
+        #endregion
+
+        #region TrackingComparisonBase Members
+        public override int CompareTrackingInfo( TrackingInfo aLeft, TrackingInfo aRight )
+        {
+            return aLeft.Symbol.Name.CompareTo( aRight.Symbol.Name );
+        }
+        #endregion
+    }
+
+    public class TrackingInfoSortByAssociatedCellCount : TrackingComparisonBase
+    {
+        #region Constructors & destructor
+        public TrackingInfoSortByAssociatedCellCount( bool aAscending )
+            : base( aAscending )
+        {
+        }
+        #endregion
+
+        #region TrackingComparisonBase Members
+        public override int CompareTrackingInfo( TrackingInfo aLeft, TrackingInfo aRight )
+        {
+            int ret = -1;
+            //
+            if	( aLeft.AssociatedCellCount == aRight.AssociatedCellCount )
+            {
+                ret = 0;
+            }
+            else if ( aLeft.AssociatedCellCount > aRight.AssociatedCellCount )
+            {
+                ret = 1;
+            }
+            //
+            return ret;
+        }
+        #endregion
+    }
+
+    public class TrackingInfoSortByCount : TrackingComparisonBase
+    {
+        #region Constructors & destructor
+        public TrackingInfoSortByCount( bool aAscending )
+            : base( aAscending )
+        {
+        }
+        #endregion
+
+        #region TrackingComparisonBase Members
+        public override int CompareTrackingInfo( TrackingInfo aLeft, TrackingInfo aRight )
+        {
+            int ret = -1;
+            //
+            if	( aLeft.Count == aRight.Count )
+            {
+                ret = 0;
+            }
+            else if ( aLeft.Count > aRight.Count )
+            {
+                ret = 1;
+            }
+            //
+            return ret;
+        }
+        #endregion
+    }
+
+    public class TrackingInfoSortByPayloadLength : TrackingComparisonBase
+    {
+        #region Constructors & destructor
+        public TrackingInfoSortByPayloadLength( bool aAscending )
+            : base( aAscending )
+        {
+        }
+        #endregion
+
+        #region TrackingComparisonBase Members
+        public override int CompareTrackingInfo( TrackingInfo aLeft, TrackingInfo aRight )
+        {
+            int ret = -1;
+            //
+            if	( aLeft.PayloadLength == aRight.PayloadLength )
+            {
+                ret = 0;
+            }
+            else if ( aLeft.PayloadLength > aRight.PayloadLength )
+            {
+                ret = 1;
+            }
+            //
+            return ret;
+        }
+        #endregion
+    }
+
+    public class TrackingInfoSortByAssociatedMemory : TrackingComparisonBase
+    {
+        #region Constructors & destructor
+        public TrackingInfoSortByAssociatedMemory( bool aAscending )
+            : base( aAscending )
+        {
+        }
+        #endregion
+
+        #region TrackingComparisonBase Members
+        public override int CompareTrackingInfo( TrackingInfo aLeft, TrackingInfo aRight )
+        {
+            int ret = 1;
+            //
+            if	( aLeft.AssociatedMemory < aRight.AssociatedMemory )
+            {
+                ret = -1;
+            }
+            else if ( aLeft.AssociatedMemory == aRight.AssociatedMemory )
+            {
+                ret = 0;
+            }
+            //
+            return ret;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/Base/TrackingInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,169 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianStructuresLib.Debug.Symbols;
+using SymbianStructuresLib.Debug.Symbols.Constants;
+using HeapLib.Cells;
+using HeapLib.Array;
+
+namespace HeapLib.Statistics.Tracking.Base
+{
+    public class TrackingInfo : IEnumerable<HeapCell>
+    {
+        #region Static 'Null Entry' item
+        internal static TrackingInfo CreateNull()
+        {
+            Symbol defaultSym = Symbol.NewDefault();
+            TrackingInfo self = new TrackingInfo( defaultSym );
+            return self;
+        }
+        #endregion
+
+        #region Constructors & destructor
+        internal TrackingInfo( Symbol aSymbol )
+        {
+            iSymbol = aSymbol;
+        }
+        #endregion
+
+        #region Methods
+        internal void Associate( HeapCell aCell )
+        {
+            // Don't track cell associations for items
+            // without symbols.
+            if  ( aCell.Symbol != null )
+            {
+                iAssociatedCells.Add( aCell );
+            }
+
+            // Then we'll update the rest of the details
+            // for all types.
+            IncrementCount();
+            iAssociatedMemory += aCell.Length;
+        }
+
+        internal void IncrementCount()
+        {
+            ++iCount;
+        }
+        #endregion
+
+        #region Properties
+        public int AssociatedCellCount
+        {
+            get { return iAssociatedCells.Count; }
+        }
+
+        internal long Key
+        {
+            get
+            {
+                long key = SymbolConstants.KNullEntryAddress;
+                //
+                if ( !IsUnknownSymbolMatchItem )
+                {
+                    key = iSymbol.Address;
+                }
+                //
+                return key;
+            }
+        }
+
+        public bool IsUnknownSymbolMatchItem
+        {
+            get { return iSymbol == null; }
+        }
+
+        public Symbol Symbol
+        {
+            get { return iSymbol; }
+        }
+
+        public int Count
+        {
+            get { return iCount; }
+        }
+
+        public long AssociatedMemory
+        {
+            get { return iAssociatedMemory; }
+        }
+
+        public long PayloadLength
+        {
+            get { return iPayloadLength; }
+            set { iPayloadLength = value; }
+        }
+
+        public HeapCell this[ int aIndex ]
+        {
+            get { return iAssociatedCells[ aIndex ]; }
+        }
+        #endregion
+
+        #region From System.Object
+        public override string ToString()
+        {
+            string ret = iSymbol.ToString();
+            return ret;
+        }
+        #endregion
+
+        #region IEnumerable Members
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return iAssociatedCells.CreateEnumerator();
+        }
+
+        IEnumerator<HeapCell> IEnumerable<HeapCell>.GetEnumerator()
+        {
+            return iAssociatedCells.CreateEnumerator();
+        }
+        #endregion
+
+        #region Data Members
+        private Symbol iSymbol = null;
+        private int iCount = 0;
+        private long iAssociatedMemory = 0;
+        private long iPayloadLength = 0;
+        private HeapCellArray iAssociatedCells = new HeapCellArray( 10 );
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/ByDescriptor/DescriptorTrackingInfoCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+using HeapLib.Array;
+
+namespace HeapLib.Statistics.Tracking.ByDescriptor
+{
+    public class DescriptorTrackingInfoCollection : IEnumerable<HeapCell>
+    {
+        #region Constructors & destructor
+        public DescriptorTrackingInfoCollection()
+        {
+        }
+        #endregion
+
+        #region API
+        public float DescriptorLengthAsTypePercentage( HeapCell aCell )
+        {
+            System.Diagnostics.Debug.Assert( aCell.Type == HeapCell.TType.EAllocated );
+            System.Diagnostics.Debug.Assert( aCell.IsDescriptor );
+            //
+            float ret = (float) aCell.DescriptorLength / (float) AssociatedMemory;
+            return ret * 100.0f;
+        }
+        #endregion
+
+        #region Properties
+        public int AssociatedCellCount
+        {
+            get { return iAssociatedCells.Count; }
+        }
+
+        public int Count
+        {
+            get { return AssociatedCellCount; }
+        }
+
+        public long AssociatedMemory
+        {
+            get { return iAssociatedMemory; }
+        }
+
+        public HeapCell this[ int aIndex ]
+        {
+            get { return iAssociatedCells[ aIndex ]; }
+        }
+        #endregion
+
+        #region From TrackingCollectionBase
+        internal void Track( HeapCell aCell )
+        {
+            if ( aCell.Type == HeapCell.TType.EAllocated && aCell.IsDescriptor )
+            {
+                iAssociatedCells.Add( aCell );
+                iAssociatedMemory += aCell.Length;
+            }
+        }
+        #endregion
+
+        #region IEnumerable Members
+        public IEnumerator<HeapCell> GetEnumerator()
+        {
+            return iAssociatedCells.CreateEnumerator();
+        }
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return iAssociatedCells.CreateEnumerator();
+        }
+        #endregion
+
+        #region Data members
+        private long iAssociatedMemory = 0;
+        private HeapCellArray iAssociatedCells = new HeapCellArray();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/ByObject/ObjectTrackingInfoCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using SymbianUtils.Collections;
+using HeapLib.Cells;
+using HeapLib.Statistics.Tracking.Base;
+
+namespace HeapLib.Statistics.Tracking.ByObject
+{
+    public class ObjectTrackingInfoCollection : TrackingCollectionBase
+    {
+        #region Constructors & destructor
+        public ObjectTrackingInfoCollection()
+            : this( new TrackingInfoSortByAssociatedMemory( false ) )
+        {
+        }
+
+        public ObjectTrackingInfoCollection( IComparer<TrackingInfo> aComparer )
+        {
+            iList = new SymbianSortedListByValue<string, TrackingInfo>( aComparer );
+        }
+        #endregion    
+    
+        #region From TrackingCollectionBase
+        internal override void Track( HeapCell aCell )
+        {
+            if  ( aCell.Type == HeapCell.TType.EAllocated && !aCell.IsUnknown )
+            {
+                System.Diagnostics.Debug.Assert( aCell.Symbol != null );
+
+                HandleCell( aCell );
+
+                string objectName = aCell.Symbol.ObjectWithoutSection.ToLower();
+                TrackingInfo entry = iList[ objectName ];
+
+                // If we found an entry, then associate this cell with it.
+                // Otherwise, we'll need to make a new entry...
+                if  ( entry == null )
+                {
+                    entry = new TrackingInfo( aCell.Symbol );
+                    entry.PayloadLength = aCell.PayloadLength;
+
+                    iList.Add( objectName, entry );
+                }
+                entry.Associate( aCell );
+            }
+        }
+
+        public override int Count
+        {
+            get { return iList.Count; }
+        }
+
+        protected override void Sort( IComparer<TrackingInfo> aComparer )
+        {
+            iList.Sort( aComparer );
+        }
+
+        public override TrackingInfo this[ int aIndex ]
+        {
+            get { return iList[ aIndex ]; }
+        }
+        #endregion
+
+        #region Data members
+        private SymbianSortedListByValue<string, TrackingInfo> iList;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/BySymbol/SymbolTrackingInfoCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using SymbianUtils.Collections;
+using SymbianStructuresLib.Debug.Symbols;
+using SymbianStructuresLib.Debug.Symbols.Constants;
+using HeapLib.Cells;
+using HeapLib.Statistics.Tracking.Base;
+
+namespace HeapLib.Statistics.Tracking.BySymbol
+{
+	public class SymbolTrackingInfoCollection : TrackingCollectionBase
+	{
+        #region Constructors & destructor
+        public SymbolTrackingInfoCollection()
+            : this( new TrackingInfoSortByAssociatedMemory( false ) )
+        {
+        }
+
+        public SymbolTrackingInfoCollection( IComparer<TrackingInfo> aComparer )
+        {
+            iList = new SymbianSortedListByValue<uint, TrackingInfo>( aComparer );
+        }
+
+        public SymbolTrackingInfoCollection( SymbolTrackingInfoCollection aCollection )
+        {
+            iList = new SymbianSortedListByValue<uint, TrackingInfo>( aCollection.iList );
+        }
+        #endregion
+
+        #region From TrackingCollectionBase
+        internal override void Track( HeapCell aCell )
+        {
+            if ( aCell.Symbol != null && aCell.Symbol.IsDefault )
+            {
+                System.Diagnostics.Debug.WriteLine( "Unknown cell: " + aCell.ToStringExtended() + ", size: " + aCell.Symbol.Size + ", " + aCell.Symbol.Object );
+            }
+
+            if  ( aCell.Type == HeapCell.TType.EAllocated && !aCell.IsUnknown )
+            {
+                System.Diagnostics.Debug.Assert( aCell.Symbol != null );
+
+                base.HandleCell( aCell );
+
+                uint address = (uint) aCell.Symbol.Address;
+                TrackingInfo entry = iList[ address ];
+
+                // If we found an entry, then associate this cell with it.
+                // Otherwise, we'll need to make a new entry...
+                if  ( entry == null )
+                {
+                    entry = new TrackingInfo( aCell.Symbol );
+                    entry.PayloadLength = aCell.PayloadLength;
+
+                    iList.Add( address, entry );
+                }
+                entry.Associate( aCell );
+            }
+        }
+
+        public override void Remove( TrackingInfo aItem )
+        {
+            // Make a predicate to find any items that match the specified
+            // address
+            Predicate<TrackingInfo> matchPredicate = delegate( TrackingInfo aInfo )
+            {
+                return ( aInfo.Key == aItem.Key );
+            };
+            iList.Remove( matchPredicate );
+        }
+
+        public override int Count
+        {
+            get { return iList.Count; }
+        }
+
+        protected override void Sort( IComparer<TrackingInfo> aComparer )
+        {
+            iList.Sort( aComparer );
+        }
+
+        public override TrackingInfo this[ int aIndex ]
+        {
+            get { return iList[ aIndex ]; }
+        }
+
+        public override TrackingInfo this[ Symbol aSymbol ]
+        {
+            get
+            {
+                uint address = aSymbol != null ? aSymbol.Address : SymbolConstants.KNullEntryAddress;
+                TrackingInfo ret = iList[ address ];
+                return ret;
+           }
+        }
+        #endregion
+
+        #region API
+        public void RemoveRange( int aStartIndex, int aCount )
+        {
+            iList.RemoveRange( aStartIndex, aCount );
+        }
+        #endregion
+
+        #region Data members
+        private SymbianSortedListByValue<uint, TrackingInfo> iList;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Tracking/ByUnknown/UnknownTrackingInfoCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib.Cells;
+using HeapLib.Array;
+
+namespace HeapLib.Statistics.Tracking.Unknown
+{
+    public class UnknownTrackingInfoCollection : IEnumerable<HeapCell>
+    {
+        #region Constructors & destructor
+        public UnknownTrackingInfoCollection()
+        {
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        public int AssociatedCellCount
+        {
+            get { return iAssociatedCells.Count; }
+        }
+
+        public int Count
+        {
+            get { return AssociatedCellCount; }
+        }
+
+        public long AssociatedMemory
+        {
+            get { return iAssociatedMemory; }
+        }
+
+        public HeapCell this[ int aIndex ]
+        {
+            get { return iAssociatedCells[ aIndex ]; }
+        }
+        #endregion
+
+        #region From TrackingCollectionBase
+        internal void Track( HeapCell aCell )
+        {
+            if ( aCell.Type == HeapCell.TType.EAllocated && !aCell.IsDescriptor && aCell.IsUnknown )
+            {
+                iAssociatedCells.Add( aCell );
+                iAssociatedMemory += aCell.Length;
+            }
+        }
+        #endregion
+
+        #region IEnumerable Members
+        public IEnumerator<HeapCell> GetEnumerator()
+        {
+            return iAssociatedCells.CreateEnumerator();
+        }
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return iAssociatedCells.CreateEnumerator();
+        }
+        #endregion
+
+        #region Data members
+        private long iAssociatedMemory = 0;
+        private HeapCellArray iAssociatedCells = new HeapCellArray();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Types/HeapStatisticsAllocated.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapLib.Cells;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapLib.Statistics.Tracking.ByObject;
+using HeapLib.Statistics.Tracking.ByDescriptor;
+using HeapLib.Statistics.Tracking.Unknown;
+
+namespace HeapLib.Statistics.Types
+{
+	public class HeapStatisticsAllocated : HeapStatisticsBase
+	{
+        #region Constructors & destructor
+		public HeapStatisticsAllocated()
+        :   base( HeapCell.TType.EAllocated )
+		{
+		}
+        #endregion
+
+        #region From HeapStatisticsBase
+        internal override void HandleCell( HeapCell aCell )
+        {
+            try
+            {
+                base.HandleCell( aCell );
+            }
+            finally
+            {
+                // Track the cell
+                iTrackerObjects.Track( aCell );
+                iTrackerSymbols.Track( aCell );
+                iTrackerDescriptors.Track( aCell );
+                iTrackerUnknown.Track( aCell );
+            }
+        }
+        #endregion
+
+        #region Properties
+        public SymbolTrackingInfoCollection TrackerSymbols
+        {
+            get { return iTrackerSymbols; }
+        }
+
+        public ObjectTrackingInfoCollection TrackerObjects
+        {
+            get { return iTrackerObjects; }
+        }
+
+        public DescriptorTrackingInfoCollection TrackerDescriptors
+        {
+            get { return iTrackerDescriptors; }
+        }
+
+        public UnknownTrackingInfoCollection TrackerUnknown
+        {
+            get { return iTrackerUnknown; }
+        }
+        #endregion
+
+        #region Data members
+        private ObjectTrackingInfoCollection iTrackerObjects = new ObjectTrackingInfoCollection();
+        private SymbolTrackingInfoCollection iTrackerSymbols = new SymbolTrackingInfoCollection();
+        private DescriptorTrackingInfoCollection iTrackerDescriptors = new DescriptorTrackingInfoCollection();
+        private UnknownTrackingInfoCollection iTrackerUnknown = new UnknownTrackingInfoCollection();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Types/HeapStatisticsBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,207 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapLib.Cells;
+using HeapLib.Statistics.Distribution;
+using HeapLib.Array;
+
+namespace HeapLib.Statistics.Types
+{
+	public class HeapStatisticsBase
+	{
+		#region Constructors & destructor
+		public HeapStatisticsBase( HeapCell.TType aType )
+		{
+            iType = aType;
+		}
+		#endregion
+
+        #region Framework API
+        internal virtual void Finalise( HeapCellArrayBase aArray )
+        {
+            // Some operations cannot run until after the relationship inspector has finished it's task.
+            foreach ( HeapCell cell in aArray )
+            {
+                int newCellCountReferencedBy = cell.RelationshipManager.ReferencedBy.Count;
+                if ( iCellNumberOfReferencesGreatest == null || newCellCountReferencedBy > iCellNumberOfReferencesGreatest.RelationshipManager.ReferencedBy.Count )
+                {
+                    iCellNumberOfReferencesGreatest = cell;
+                }
+                if ( iCellNumberOfReferencesLowest == null || newCellCountReferencedBy < iCellNumberOfReferencesLowest.RelationshipManager.ReferencedBy.Count )
+                {
+                    iCellNumberOfReferencesLowest = cell;
+                }
+
+                int newCellCountEmbeddedReferences = cell.RelationshipManager.EmbeddedReferencesTo.Count;
+                if ( iCellNumberOfEmbeddedReferencesMost == null || newCellCountEmbeddedReferences > iCellNumberOfEmbeddedReferencesMost.RelationshipManager.EmbeddedReferencesTo.Count )
+                {
+                    iCellNumberOfEmbeddedReferencesMost = cell;
+                }
+                if ( iCellNumberOfEmbeddedReferencesLeast == null || newCellCountEmbeddedReferences < iCellNumberOfEmbeddedReferencesLeast.RelationshipManager.EmbeddedReferencesTo.Count )
+                {
+                    iCellNumberOfEmbeddedReferencesLeast = cell;
+                }
+            }
+        }
+
+        internal virtual void HandleCell( HeapCell aCell )
+		{
+            ++iTypeCount;
+            //
+            iTypeSizeHeader += aCell.HeaderSize;
+            iTypeSizePayload += aCell.PayloadLength;
+            //
+            iDistribution.Register( aCell.Length );
+            //
+            if  ( iCellLargest == null || aCell.Length > iCellLargest.Length )
+            {
+                iCellLargest = aCell;
+            }
+            if  ( iCellSmallest == null || aCell.Length < iCellSmallest.Length )
+            {
+                iCellSmallest = aCell;
+            }
+            //
+            if  ( iCellAllocationNumberLargest == null || aCell.AllocationNumber > iCellAllocationNumberLargest.AllocationNumber )
+            {
+                iCellAllocationNumberLargest = aCell;
+            }
+            if  ( iCellAllocationNumberSmallest == null || aCell.AllocationNumber > iCellAllocationNumberSmallest.AllocationNumber )
+            {
+                iCellAllocationNumberSmallest = aCell;
+            }
+        }
+        #endregion
+
+		#region API
+        public float CellLengthAsTypePercentage( HeapCell aCell )
+        {
+            float ret = (float) aCell.Length / (float) TypeSize;
+            return ret * 100.0f;
+        }
+        #endregion
+
+		#region Properties
+        public HeapCell.TType Type
+        {
+            get { return iType; }
+        }
+
+        public int TypeCount
+        {
+            get { return iTypeCount; }
+        }
+
+        public long TypeSize
+        {
+            get { return iTypeSizeHeader + iTypeSizePayload; }
+        }
+
+        public long TypeSizeHeader
+        {
+            get { return iTypeSizeHeader; }
+        }
+
+        public long TypeSizePayload
+        {
+            get { return iTypeSizePayload; }
+        }
+
+        public HeapCell CellAllocationNumberLargest
+        {
+            get { return iCellAllocationNumberLargest; }
+        }
+
+        public HeapCell CellAllocationNumberSmallest
+        {
+            get { return iCellAllocationNumberSmallest; }
+        }
+
+        public HeapCell CellLargest
+        {
+            get { return iCellLargest; }
+        }
+
+        public HeapCell CellSmallest
+        {
+            get { return iCellSmallest; }
+        }
+
+        public HeapCell CellNumberOfReferencesLowest
+        {
+            get { return iCellNumberOfReferencesLowest; }
+        }
+
+        public HeapCell CellNumberOfReferencesGreatest
+        {
+            get { return iCellNumberOfReferencesGreatest; }
+        }
+
+        public HeapCell CellNumberOfEmbeddedReferencesLeast
+        {
+            get { return iCellNumberOfEmbeddedReferencesLeast; }
+        }
+
+        public HeapCell CellNumberOfEmbeddedReferencesMost
+        {
+            get { return iCellNumberOfEmbeddedReferencesMost; }
+        }
+
+        public HeapCellSizeDistribution Distribution
+		{
+			get { return iDistribution; }
+		}
+        #endregion
+
+		#region Data members
+        private readonly HeapCell.TType iType;
+        private int iTypeCount;
+        private long iTypeSizeHeader;
+        private long iTypeSizePayload;
+        private HeapCell iCellAllocationNumberLargest = null;
+        private HeapCell iCellAllocationNumberSmallest = null;
+        private HeapCell iCellNumberOfReferencesLowest = null;
+        private HeapCell iCellNumberOfReferencesGreatest = null;
+        private HeapCell iCellNumberOfEmbeddedReferencesLeast = null;
+        private HeapCell iCellNumberOfEmbeddedReferencesMost = null;
+        private HeapCell iCellLargest = new HeapCell( 0, uint.MinValue, HeapCell.TType.EAllocated );
+        private HeapCell iCellSmallest = new HeapCell( 0, uint.MaxValue, HeapCell.TType.EAllocated );
+        private HeapCellSizeDistribution iDistribution = new HeapCellSizeDistribution();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/HeapLib/Statistics/Types/HeapStatisticsFree.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapLib.Cells;
+
+namespace HeapLib.Statistics.Types
+{
+	public class HeapStatisticsFree : HeapStatisticsBase
+	{
+        #region Constructors & destructor
+		public HeapStatisticsFree()
+        :   base( HeapCell.TType.EFree )
+		{
+		}
+        #endregion
+
+        #region From HeapStatisticsBase
+        internal override void HandleCell( HeapCell aCell )
+        {
+            try
+            {
+                base.HandleCell( aCell );
+            }
+            finally
+            {
+            }
+        }
+        #endregion
+
+        #region Data members
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("MemAnalysisLib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Nokia")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]		
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Interfaces/CollectionManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Operations;
+
+namespace MemAnalysisLib.Interfaces
+{
+    internal interface CollectionManager
+    {
+        #region API
+        void RemoveLastOperation();
+        void RemovePriorOperation( MemOpBase aItem );
+        void AddNewPriorOperation( MemOpBase aItem );
+        void RemoveFromCollection( MemOpBase aItem );
+        void AddToCollection( MemOpBase aItem, SymbolLib.Generics.GenericSymbol aSymbol, uint aLinkRegisterAddress );
+        MemOpBase PriorOperationByAllocationNumber( uint aAllocNumber );
+        #endregion
+
+        #region Properties
+        MemOpBase LastOperation
+        {
+            get;
+        }
+
+        int AllPriorOperationsCount
+        {
+            get;
+        }
+
+        List<MemOpBase> AllPriorOperations
+        {
+            get;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisLib.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,160 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <ProjectType>Local</ProjectType>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{94F69E44-75FC-4035-9B08-920CF0E0188C}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ApplicationIcon>
+    </ApplicationIcon>
+    <AssemblyKeyContainerName>
+    </AssemblyKeyContainerName>
+    <AssemblyName>MemAnalysisLib</AssemblyName>
+    <AssemblyOriginatorKeyFile>
+    </AssemblyOriginatorKeyFile>
+    <DefaultClientScript>JScript</DefaultClientScript>
+    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+    <DefaultTargetSchema>IE50</DefaultTargetSchema>
+    <DelaySign>false</DelaySign>
+    <OutputType>Library</OutputType>
+    <RootNamespace>MemAnalysisLib</RootNamespace>
+    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+    <StartupObject>
+    </StartupObject>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>true</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>false</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>false</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>none</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System">
+      <Name>System</Name>
+    </Reference>
+    <Reference Include="System.Data">
+      <Name>System.Data</Name>
+    </Reference>
+    <Reference Include="System.Drawing">
+      <Name>System.Drawing</Name>
+    </Reference>
+    <Reference Include="System.Windows.Forms">
+      <Name>System.Windows.Forms</Name>
+    </Reference>
+    <Reference Include="System.Xml">
+      <Name>System.XML</Name>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Interfaces\CollectionManager.cs" />
+    <Compile Include="MemoryOperations\Class\MemOpClass.cs" />
+    <Compile Include="MemoryOperations\Functions\Kernel\MemOpFnAllocations.cs" />
+    <Compile Include="MemoryOperations\Functions\Kernel\MemOpFnFrees.cs" />
+    <Compile Include="MemoryOperations\Functions\Kernel\MemOpFnKBase.cs" />
+    <Compile Include="MemoryOperations\Functions\Kernel\MemOpFnReallocations.cs" />
+    <Compile Include="MemoryOperations\Operations\MemOpReallocation.cs" />
+    <Compile Include="MemoryOperations\Operations\MemOpFree.cs" />
+    <Compile Include="MemoryOperations\Operations\MemOpAllocation.cs" />
+    <Compile Include="MemoryOperations\Operations\MemOpBase.cs" />
+    <Compile Include="MemoryOperations\Functions\User\MemOpFnReallocations.cs" />
+    <Compile Include="MemoryOperations\Functions\User\MemOpFnUBase.cs" />
+    <Compile Include="MemoryOperations\Functions\User\MemOpFnFrees.cs" />
+    <Compile Include="MemoryOperations\Functions\User\MemOpFnAllocations.cs" />
+    <Compile Include="MemoryOperations\Functions\MemOpFnBase.cs" />
+    <Compile Include="MemAnalysisRegionalCollection.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MemAnalysisSorters.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="MemAnalysisStatisticalCollection.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Parser\Base\MemAnalysisParserBase.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Parser\Implementations\MemAnalysisRegionalParser.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Parser\Implementations\MemAnalysisStatisticalParser.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Parser\Options\MemAnalysisParserOptions.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Parser\Prefixes\Kernel\MemAnalysisParserPrefixesKernel.cs" />
+    <Compile Include="Parser\Prefixes\MemAnalysisParserPrefixesBase.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Parser\Prefixes\User\MemAnalysisParserPrefixesUser.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbolLib\SymbolLib.csproj">
+      <Project>{C657DF4B-FA67-47DD-89FC-A45583646184}</Project>
+      <Name>SymbolLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Misc\" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>
+    </PreBuildEvent>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisLib.csproj.user	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,58 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <LastOpenVersion>7.10.6030</LastOpenVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ReferencePath>
+    </ReferencePath>
+    <CopyProjectDestinationFolder>
+    </CopyProjectDestinationFolder>
+    <CopyProjectUncPath>
+    </CopyProjectUncPath>
+    <CopyProjectOption>0</CopyProjectOption>
+    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectTrust>0</ProjectTrust>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisRegionalCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,637 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Operations;
+
+namespace MemAnalysisLib
+{
+	public class MemObjRegionMarker
+	{
+		#region Properties
+		public bool Initialised
+		{
+			get
+			{
+				return !( LineNumber == KUninitialisedLineNumber && RegionText == KUninitialisedRegionText );
+			}
+		}
+		
+		public bool MatchedRegionText
+		{
+			get { return iMatchedRegionText; }
+			set { iMatchedRegionText = value; }
+		}
+
+		public string RegionText
+		{
+			get { return iRegionText; }
+			set { iRegionText = value; }
+		}
+
+		public long LineNumber
+		{
+			get { return iLineNumber; }
+			set { iLineNumber = value; }
+		}
+		#endregion
+
+		#region Internal constants
+		const long KUninitialisedLineNumber = -1;
+		const string KUninitialisedRegionText = "__!__!__!UNINIT!__!__!__";
+		#endregion
+
+		#region Data members
+		private bool iMatchedRegionText;
+		private string iRegionText = KUninitialisedRegionText;
+		private long iLineNumber = KUninitialisedLineNumber;
+		#endregion
+	}
+
+	public class MemObjRegionalCollection
+	{
+		#region Constructor & destructor
+		public MemObjRegionalCollection()
+		{
+		}
+		#endregion
+
+		#region API
+		public void Add( MemOpBase aItem )
+		{
+			iItems.Add( aItem );
+		}
+
+		public MemOpBase ItemByAddress( long aCellAddress )
+		{
+			int index;
+			return ItemByAddress( aCellAddress, out index );
+		}
+
+		public MemOpBase ItemByAddress( long aCellAddress, out int aIndex )
+		{
+			aIndex = -1;
+			MemOpBase ret = null;
+			int count = iItems.Count;
+			//
+			for( int i = count-1; i>=0; i-- )
+			{
+				MemOpBase item = (MemOpBase) iItems[ i ];
+				if	( item.CellAddress == aCellAddress )
+				{
+					aIndex = i;
+					ret = item;
+					break;
+				}
+			}
+			//
+			return ret;
+		}
+
+		public MemOpBase ItemByAddress( long aCellAddress, TClass aClass )
+		{
+			int index;
+			return ItemByAddress( aCellAddress, aClass, out index );
+		}
+
+		public MemOpBase ItemByAddress( long aCellAddress, TClass aClass, out int aIndex )
+		{
+			aIndex = -1;
+			MemOpBase ret = null;
+			int count = iItems.Count;
+			//
+			for( int i = count-1; i>=0; i-- )
+			{
+				MemOpBase item = (MemOpBase) iItems[ i ];
+				if	( item.CellAddress == aCellAddress )
+				{
+					if	( aClass == TClass.ENotApplicable || item.Class == aClass )
+					{
+						aIndex = i;
+						ret = item;
+						break;
+					}
+				}
+			}
+			//
+			return ret;
+		}
+
+		public MemOpBase ItemByOperationIndex( long aOpIndex, TClass aClass, out int aIndex )
+		{
+			aIndex = -1;
+			MemOpBase ret = null;
+			int count = iItems.Count;
+			//
+			for( int i = count-1; i>=0; i-- )
+			{
+				MemOpBase item = (MemOpBase) iItems[ i ];
+				if	( item.OperationIndex == aOpIndex )
+				{
+					if	( aClass == TClass.ENotApplicable || item.Class == aClass )
+					{
+						aIndex = i;
+						ret = item;
+						break;
+					}
+				}
+			}
+			//
+			return ret;
+		}
+
+		public bool RemoveByCellAddress( MemOpBase aItem )
+		{
+			int index;
+			bool ret = false;
+			//
+			if	( ItemByAddress( aItem.CellAddress, aItem.Class, out index ) != null )
+			{
+				iItems.RemoveAt( index );
+				ret = true;
+			}
+			//
+			return ret;
+		}
+		#endregion
+
+		#region Properties
+		public int Count
+		{
+			get { return iItems.Count; }
+		}
+
+		public MemOpBase this[int aIndex]
+		{
+			get
+			{
+				MemOpBase item = (MemOpBase) iItems[aIndex];
+				return item;
+			}
+		}
+
+		public MemObjRegionMarker RegionStart
+		{
+			get { return iRegionStart; }
+			set { iRegionStart = value; }
+		}
+
+		public MemObjRegionMarker RegionEnd
+		{
+			get { return iRegionEnd; }
+			set { iRegionEnd = value; }
+		}
+
+		public long AllocationCount
+		{
+			get
+			{
+				long ret = 0;
+				//
+				int count = Count;
+				for(int i=0; i<count; i++)
+				{
+					MemOpBase item = this[i];
+					if	( item is MemOpAllocation )
+					{
+						ret++;
+					}
+				}
+				//
+				return ret;
+			}
+		}
+
+		public long DeallocationCount
+		{
+			get
+			{
+				long ret = 0;
+				//
+				int count = Count;
+				for(int i=0; i<count; i++)
+				{
+					MemOpBase item = this[i];
+					if	( item is MemOpFree )
+					{
+						ret++;
+					}
+				}
+				//
+				return ret;
+			}
+		}
+
+        public long TotalAmountOfAllocatedMemory
+		{
+			get
+			{
+                long ret = 0;
+                //
+                foreach ( MemOpBase op in iItems )
+                {
+                    if ( op.Class == TClass.EReallocation )
+                    {
+                        #warning Fix me - TotalAmountOfAllocatedMemory is broken for reallocs
+                    }
+                    else if ( op.Class == TClass.EAllocation )
+                    {
+                        MemOpAllocation allocItem = (MemOpAllocation) op;
+                        ret += allocItem.CellSize;
+                    }
+                }
+                //
+                return ret;
+            }
+		}
+
+        public long TotalAmountOfDeallocatedMemory
+		{
+			get
+			{
+                long ret = 0;
+                //
+                foreach ( MemOpBase op in iItems )
+                {
+                    if ( op.Class == TClass.EDeallocation && op.Link != null )
+                    {
+                        MemOpAllocation allocItem = (MemOpAllocation) op.Link;
+                        ret += allocItem.CellSize;
+                    }
+                }
+                //
+                return ret;
+            }
+		}
+
+        public long TotalMemoryAllocatedButNotFreed
+		{
+			get
+			{
+                long ret = 0;
+                //
+                foreach ( MemOpBase op in iItems )
+                {
+                    // Allocated cells without links back to the deleted cells
+                    // must be orphans.
+                    if ( op.Link == null )
+                    {
+                        if ( op.Class == TClass.EAllocation )
+                        {
+                            MemOpAllocation allocItem = (MemOpAllocation) op;
+                            ret += allocItem.CellSize;
+                        }
+                        else if ( op.Class == TClass.EReallocation )
+                        {
+                            #warning Fix me - TotalMemoryAllocatedButNotFreed is broken for reallocs
+                            MemOpReallocation allocItem = (MemOpReallocation) op;
+                            ret += allocItem.CellSize;
+                        }
+                    }
+                }
+                //
+                return ret;
+            }
+		}
+		#endregion
+
+		#region Internal methods
+		#endregion
+
+		#region Data members
+		private MemObjRegionMarker iRegionStart = new MemObjRegionMarker();
+		private MemObjRegionMarker iRegionEnd = new MemObjRegionMarker();
+		private ArrayList iItems = new ArrayList(50);
+		#endregion
+	}
+
+	public class MemObjRegionalData
+	{
+		#region Constants
+		const string KOperationOutsideOfRegionText = "Memory operation(s) took place outside of region markers";
+		#endregion
+
+		#region Constructor & destructor
+		public MemObjRegionalData()
+		{
+		}
+		#endregion
+
+		#region API
+		public void MarkerStartIdentified( string aText, long aLineNumber )
+		{
+			if	( iCurrentCollection != null )
+			{
+				// We've just finished a collection. Normally this is handled
+				// by the end item, but if the end item wasn't found, then
+				// we must do it manually.
+				CurrentCollectionComplete( KOperationOutsideOfRegionText, aLineNumber - 1, false );
+			}
+
+			// Set the starting items
+			iCurrentCollection = new MemObjRegionalCollection();
+			iCurrentCollection.RegionStart.RegionText = aText;
+			iCurrentCollection.RegionStart.LineNumber = aLineNumber;
+			iCurrentCollection.RegionStart.MatchedRegionText = true;
+		}
+
+		public void MarkerEndIdentified( string aText, long aLineNumber )
+		{
+			CurrentCollectionComplete( aText, aLineNumber, true );
+		}
+
+		public void AllItemsLocated( long aLastLineNumber )
+		{
+			// Don't need these anymore
+			if	( iCurrentCollection != null )
+			{
+				iCurrentCollection.RegionEnd.RegionText = "";
+				iCurrentCollection.RegionEnd.LineNumber = aLastLineNumber;
+				iCollections.Add( iCurrentCollection );
+			}
+			iCurrentCollection = null;
+			iAllItems.Clear();
+		}
+
+		public void Add( MemOpBase aItem, bool aDiscardAllocAndFreedMatchingCells )
+		{
+			#region When deallocating, search for original alloc and link items...
+			// If the item is a de-allocation, hunt backwards through the allocation
+			// list until we find the allocating cell. Then setup their two-way relationship
+			bool throwAwayObject = false;
+
+			if	( aItem.IsAllocationType == false )
+			{
+				int count = iAllItems.Count;
+				for(int i=count - 1; i>=0; i--)
+				{
+					MemOpBase item = (MemOpBase) iAllItems[i];
+					//
+					if	( item.Link == null && item.CellAddress == aItem.CellAddress && item.IsAllocationType != aItem.IsAllocationType )
+					{
+						// The item should be the allocation that this de-alloc is associated
+						// with..
+						//System.Diagnostics.Debug.Assert( item.IsAllocationType == true ); - User::Realloc screwing things up?
+						if	( aDiscardAllocAndFreedMatchingCells )
+						{
+							// Can ignore both cells. First remove teh previous allocation cell.
+							iAllItems.RemoveAt( i );
+
+							// We don't even add aItem to the 'all items' container.
+							// However, we still need to remove the linked allocation from it's container.
+							if	( item.Collection != null )
+							{
+								MemObjRegionalCollection collectionForAllocation = (MemObjRegionalCollection) item.Collection;
+								int colCount = collectionForAllocation.Count;
+								collectionForAllocation.RemoveByCellAddress( item );
+
+								// Make sure we really removed it.
+								System.Diagnostics.Debug.Assert( collectionForAllocation.Count == colCount - 1 );
+
+								// We don't want to log this 'free' operation since it perfectly 
+								// matched an allocation.
+								throwAwayObject = true;
+							}
+						}
+						else
+						{
+							item.Link = aItem;
+							aItem.Link = item;
+						}
+
+						break;
+					}
+				}
+			}
+			#endregion
+	
+			// Add the item to our master list...
+			if	( !throwAwayObject )
+			{
+				AddToCollection( aItem );
+			}
+		}
+
+		public void Add( MemOpReallocation aItem )
+		{
+#warning THIS CODE IS TOTALLY BROKEN - RETEST AFTER COLLECING NEW TRACES
+
+			/*
+             * The main issue is that it doesn't store the full reallocation chain for repeated reallocations
+             * 
+			// Locate the original allocation item...
+			int itemIndex;
+			int collectionIndex;
+			MemOpBase item;
+			MemObjRegionalCollection collection = CollectionByCellAddress( aItem.OriginalCellAddress, TClass.EAllocation, out item, out collectionIndex, out itemIndex );
+			//
+			if	( collection != null && item != null )
+			{
+				// It should be an allocation item
+				System.Diagnostics.Debug.Assert( item is MemOpAllocation );
+
+				// Update it
+				MemOpAllocation allocItem = (MemOpAllocation) item;
+				allocItem.AllocationSize = aItem.AllocationSize;
+				allocItem.HeapSize = aItem.HeapSize;
+				allocItem.CellAddress = aItem.CellAddress;
+
+				// Associate
+				aItem.Link = item;
+
+				AddToCollection( aItem );
+			}
+             */
+		}
+
+		public MemObjRegionalCollection CollectionByOperationIndex( long aOpIndex, TClass aClass, out MemOpBase aItem, out int aCollectionIndex, out int aItemIndex )
+		{
+			aItem = null;
+			aCollectionIndex = -1;
+			aItemIndex = -1;
+			MemObjRegionalCollection ret = null;
+
+			// First check whether the item is in the current collection (if we have one)
+			if	( iCurrentCollection != null )
+			{
+				aItem = iCurrentCollection.ItemByOperationIndex( aOpIndex, aClass, out aItemIndex );
+				if	( aItem != null )
+				{
+					// Yes, it resides in the current collection...
+					ret = iCurrentCollection;
+				}
+			}
+			else
+			{
+				// Need to search the remaining collections. Must search backwards!
+				int count = iCollections.Count;
+				for( int i = count-1; i>=0; i-- )
+				{
+					MemObjRegionalCollection collection = (MemObjRegionalCollection) iCollections[ i ];
+					aItem = collection.ItemByOperationIndex( aOpIndex, aClass, out aItemIndex );
+					if	( aItem != null )
+					{
+						// Yes, its in this collection 
+						ret = collection;
+						aCollectionIndex = i;
+						break;
+					}
+				}
+			}
+
+			return ret;
+		}
+
+        public MemObjRegionalCollection CollectionByCellAddress( long aCellAddress, TClass aClass )
+		{
+			int index;
+			return CollectionByCellAddress( aCellAddress, aClass, out index );
+		}
+
+		public MemObjRegionalCollection CollectionByCellAddress( long aCellAddress, TClass aClass, out int aCollectionIndex )
+		{
+			aCollectionIndex = -1;
+			int itemIndex = -1;
+			MemOpBase item = null;
+			return CollectionByCellAddress( aCellAddress, aClass, out item, out aCollectionIndex, out itemIndex );
+		}
+		
+		public MemObjRegionalCollection CollectionByCellAddress( long aCellAddress, TClass aClass, out MemOpBase aItem, out int aCollectionIndex, out int aItemIndex )
+		{
+			aItem = null;
+			aCollectionIndex = -1;
+			aItemIndex = -1;
+			MemObjRegionalCollection ret = null;
+
+			// First check whether the item is in the current collection (if we have one)
+			if	( iCurrentCollection != null )
+			{
+				aItem = iCurrentCollection.ItemByAddress( aCellAddress, aClass, out aItemIndex );
+				if	( aItem != null )
+				{
+					// Yes, it resides in the current collection...
+					ret = iCurrentCollection;
+				}
+			}
+			else
+			{
+				// Need to search the remaining collections. Must search backwards!
+				int count = iCollections.Count;
+				for( int i = count-1; i>=0; i-- )
+				{
+					MemObjRegionalCollection collection = (MemObjRegionalCollection) iCollections[ i ];
+					aItem = collection.ItemByAddress( aCellAddress, aClass, out aItemIndex );
+					if	( aItem != null )
+					{
+						// Yes, its in this collection 
+						ret = collection;
+						aCollectionIndex = i;
+						break;
+					}
+				}
+			}
+
+			return ret;
+		}
+		#endregion
+
+		#region Properties
+		public int Count
+		{
+			get { return iCollections.Count; }
+		}
+
+		public MemObjRegionalCollection this[ int aIndex ]
+		{
+			get
+			{
+				MemObjRegionalCollection ret = (MemObjRegionalCollection) iCollections[ aIndex ];
+				return ret;
+			}
+		}
+		#endregion
+
+		#region Internal methods
+		private void AddToCollection( MemOpBase aItem )
+		{
+			// Add the item to our master list...
+			iAllItems.Add( aItem );
+			aItem.OperationIndex = iAllItems.Count;
+
+			// If the start region marker hasn't been initialised, it means
+			// that the object operation took place outside of an allocation
+			if	( iCurrentCollection == null || iCurrentCollection.RegionStart.Initialised == false )
+			{
+				if	( iCurrentCollection == null )
+					iCurrentCollection = new MemObjRegionalCollection();
+
+				// In this case, we set the start line number to the line upon
+				// which the operation took place.
+				iCurrentCollection.RegionStart.LineNumber = aItem.LineNumber;
+				iCurrentCollection.RegionStart.RegionText = KOperationOutsideOfRegionText;
+			}
+
+			// Associate the item with this collection
+			aItem.Collection = iCurrentCollection;
+			iCurrentCollection.Add( aItem );
+		}
+		
+		private void CurrentCollectionComplete( string aText, long aLineNumber, bool aMatchedRegionText )
+		{
+			if	( iCurrentCollection != null )
+			{
+				iCurrentCollection.RegionEnd.RegionText = aText;
+				iCurrentCollection.RegionEnd.LineNumber = aLineNumber;
+				iCurrentCollection.RegionEnd.MatchedRegionText = aMatchedRegionText;
+				//
+				iCollections.Add( iCurrentCollection );
+				iCurrentCollection = null;
+			}
+		}
+		#endregion
+
+		#region Data members
+		private MemObjRegionalCollection iCurrentCollection;
+		private ArrayList iAllItems = new ArrayList( 5000 );
+		private ArrayList iCollections = new ArrayList( 100 );
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisSorters.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+
+namespace MemAnalysisLib
+{
+	internal class MemAnalysisStatisticalComparerByAllocationCount : IComparer<MemObjStatisticalCollection>
+	{
+        int IComparer<MemObjStatisticalCollection>.Compare( MemObjStatisticalCollection aLeft, MemObjStatisticalCollection aRight )
+        {
+            int ret = -1;
+            //
+            if ( aLeft.AllocationCount == aRight.AllocationCount )
+            {
+                ret = 0;
+            }
+            else if ( aLeft.AllocationCount > aRight.AllocationCount )
+            {
+                ret = 1;
+            }
+            //
+            return ret;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemAnalysisStatisticalCollection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,719 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.Interfaces;
+
+namespace MemAnalysisLib
+{
+	public class MemObjStatisticalCollection
+	{
+		#region Constructor & destructor
+		public MemObjStatisticalCollection()
+		{
+		}
+		#endregion
+
+		#region API
+		public void Add( MemOpBase aItem )
+		{
+			iItems.Add( aItem );
+		}
+
+		public bool Remove( MemOpBase aItem )
+		{
+			int index;
+			bool ret = false;
+			//
+            if ( ItemByAddressAndOperationIndex( aItem.CellAddress, aItem.OperationIndex, aItem.Class, out index ) != null )
+			{
+				iItems.RemoveAt( index );
+				ret = true;
+			}
+			//
+			return ret;
+		}
+		#endregion
+
+		#region Properties
+		public int Count
+		{
+			get { return iItems.Count; }
+		}
+
+		public MemOpBase this[int aIndex]
+		{
+			get
+			{
+				MemOpBase item = iItems[aIndex];
+				return item;
+			}
+		}
+
+		public long AllocationCount
+		{
+			get
+			{
+				long ret = 0;
+				//
+                foreach( MemOpBase op in iItems )
+                {
+                    if ( op.IsAllocationType )
+                    {
+                        ++ret;
+                    }
+				}
+				//
+				return ret;
+			}
+		}
+
+		public long DeallocationCount
+		{
+			get
+			{
+				long ret = 0;
+				//
+                foreach ( MemOpBase op in iItems )
+                {
+                    if ( op.Class == TClass.EDeallocation )
+                    {
+                        ret++;
+                    }
+                }
+                //
+				return ret;
+			}
+		}
+
+        public long TotalAmountOfAllocatedMemory
+		{
+			get
+			{
+				long ret = 0;
+				//
+                foreach ( MemOpBase op in iItems )
+                {
+                    if ( op.IsAllocationType )
+                    {
+                        ret += op.CellSize;
+                    }
+                }
+				//
+				return ret;
+			}
+		}
+
+        public long TotalAmountOfDeallocatedMemory
+		{
+			get
+			{
+                long ret = 0;
+                //
+                foreach ( MemOpBase op in iItems )
+                {
+                    if ( op.IsDeallocationType )
+                    {
+                        ret += op.CellSize;
+                    }
+                }
+                //
+                return ret;
+			}
+		}
+
+        public long TotalMemoryAllocatedButNotFreed
+		{
+			get
+			{
+                long ret = 0;
+                //
+                foreach ( MemOpBase op in iItems )
+                {
+                    // Allocated cells without links back to the deleted cells
+                    // must be orphans.
+                    if ( op.Link == null )
+                    {
+                        if ( op.Class == TClass.EAllocation )
+                        {
+                            ret += op.CellSize;
+                        }
+                        else if ( op.Class == TClass.EReallocation )
+                        {
+                            ret += op.CellSize;
+                        }
+                    }
+                }
+                //
+                return ret;
+			}
+		}
+		#endregion
+
+		#region Internal methods
+		public MemOpBase ItemByAddressAndOperationIndex( uint aCellAddress, int aOperationIndex, TClass aClass, out int aIndex )
+		{
+            aIndex = -1;
+            MemOpBase ret = null;
+            //
+			for( int i = iItems.Count-1; i>=0; i-- )
+			{
+				MemOpBase item = iItems[ i ];
+                //
+				if	( item.CellAddress == aCellAddress && item.OperationIndex == aOperationIndex )
+				{
+                    if ( aClass == TClass.ENotApplicable )
+                    {
+                        aIndex = i;
+                        ret = item;
+                        break;
+                    }
+                    else if ( item.Class == aClass )
+                    {
+                        aIndex = i;
+                        ret = item;
+                        break;
+                    }
+				}
+			}
+			//
+			return ret;
+		}
+		#endregion
+
+		#region Data members
+        private List<MemOpBase> iItems = new List<MemOpBase>( 50 );
+		#endregion
+	}
+
+    public class MemObjStatisticalData : CollectionManager
+	{
+		#region Constructor & destructor
+		public MemObjStatisticalData()
+		{
+			iCollections.Add( iNullSymbolCollection );
+		}
+		#endregion
+
+		#region API
+		public void Add( MemOpBase aItem, bool aDiscardAllocAndFreedMatchingCells )
+		{
+            /*
+            if ( aItem.CellAddress == 0xc8036684 )
+            {
+                int x = 0;
+                x++;
+                MemOpAllocation ob = (MemOpAllocation) aItem;
+                if	( ob.LinkRegisterAddress == 0x80874729 )
+                {
+                    int x = 0;
+                    x++;
+                }
+            }
+            */
+
+            
+            int allItemCount = iAllItems.Count;
+
+            // Check for chained operations - we just treat it as a high level op in that case.
+            if  ( aItem.Function.ChainedFunction != null && allItemCount > 0 )
+            {
+                MemOpBase lastOp = PriorOperationByAllocationNumber( aItem.AllocationNumber );
+                if ( lastOp != null &&
+                     lastOp.AllocationNumber == aItem.AllocationNumber &&
+                     lastOp.CellAddress == aItem.CellAddress && 
+                     lastOp.Class == aItem.Class &&
+                     lastOp.Function.ToString() == aItem.Function.ChainedFunction.ToString() )
+                {
+                    // The current operation, replaces the prior one.
+                    RemoveFromCollection( lastOp );
+                    RemovePriorOperation( lastOp );
+                    allItemCount = iAllItems.Count;
+
+                    // Also, we must reset any linkage that the prior operation may have
+                    // created when it was added.
+                    if ( lastOp.Link != null )
+                    {
+                        lastOp.Link.Link = null;
+                    }
+                }
+            }
+
+			// If the item is a de-allocation, hunt backwards through the allocation
+			// list until we find the allocating cell. Then setup their two-way relationship
+            bool saveItem = true;
+            if ( aItem.IsDeallocationType )
+			{
+                MemOpBase lastOp = PriorOperationByAllocationNumber( aItem.AllocationNumber );
+                if ( aItem.Function.ChainedFunction != null && lastOp != null && lastOp.Class == TClass.EDeallocation )
+                {
+                    if ( lastOp.CellAddress == aItem.CellAddress &&
+                         lastOp.Function.ToString() == aItem.Function.ChainedFunction.ToString() )
+                    {
+                        if ( aDiscardAllocAndFreedMatchingCells )
+                        {
+                            // This is a chained delete operation, e.g:
+                            //
+                            // [KMEM] OKF     - C: 0xc802776c, HS:    80064, HCS:    85896, LR: 0x800c98c4, AS:      316, AN:      314, VT: 0x800d09c8
+                            // [KMEM] OD      - C: 0xc802776c, HS:    80064, HCS:    85896, LR: 0x800a2ea8, AS:      316, AN:      314, VT: 0x800d09c8
+                            // [KMEM] ODBD    - C: 0xc802776c, HS:    80064, HCS:    85896, LR: 0x800adec8, AS:      316, AN:      314, VT: 0x800d0000
+                            //
+                            // and we're handling OD or ODBD after already having processed OKF. In that case, we've already thrown away the original
+                            // alloc, and there's nothing left for us to do here.
+                            saveItem = false;
+                        }
+                        else
+                        {
+                            // We need to replace the OKF/OD operation with the OD/ODBD respectively. In order
+                            // for the loop below to process the item, we must re-nullify the link
+                            MemOpBase originalAllocationOp = lastOp.Link;
+                            originalAllocationOp.Link = null;
+                        }
+                    }
+                }
+
+                // If the item is a deallocation, but we can't find any matching alloc
+                // then just ignore the deallocation entirely.
+                //
+                // We'll assume that its an isolated dealloc, but if we find a matching
+                // alloc we'll toggle this back again to preseve the item.
+                saveItem = false;
+                //
+                for ( int i = allItemCount - 1; i >= 0; i-- )
+				{
+					MemOpBase item = iAllItems[i];
+					//
+					if	( item.Link == null && item.CellAddress == aItem.CellAddress && item.IsAllocationType != aItem.IsAllocationType )
+					{
+						// The item should be the allocation that this de-alloc is associated
+						// with..
+						if	( aDiscardAllocAndFreedMatchingCells )
+						{
+							// Can ignore both the allocation and deallocation.
+							RemoveFromCollection( item );
+							iAllItems.RemoveAt( i );
+							
+                            // Don't save the delete - we are ignoring matching alloc & frees
+                            break;
+						}
+						else
+						{
+							item.Link = aItem;
+							aItem.Link = item;
+                            saveItem = true;
+							break;
+						}
+					}
+				}
+			}
+	
+			// Add the item to our master list...
+            if ( saveItem )
+            {
+
+                // Locate the corresponding collection and also add the item there too
+                MemOpAllocation searchObject = null;
+                if ( aItem.IsAllocationType )
+                {
+                    searchObject = (MemOpAllocation) aItem;
+                }
+                else
+                {
+                    // Try to base the search object on the link item (if we have one..)
+                    if ( aItem.Link != null )
+                    {
+                        searchObject = (MemOpAllocation) aItem.Link;
+                    }
+                }
+
+                if ( searchObject != null )
+                {
+                    if ( searchObject.LinkRegisterSymbol != null )
+                    {
+                        MemObjStatisticalCollection collection = CollectionBySymbol( searchObject );
+                        if ( collection == null )
+                        {
+                            // Make a new collection
+                            collection = new MemObjStatisticalCollection();
+                            iCollections.Add( collection );
+                        }
+                        collection.Add( aItem );
+                    }
+                    else
+                    {
+                        // Use the null symbol collection
+                        iNullSymbolCollection.Add( aItem );
+                    }
+                }
+
+                AddNewPriorOperation( aItem );
+            }
+		}
+
+		public void Add( MemOpReallocation aItem )
+		{
+            aItem.Function.Process( aItem, this );
+
+#warning This code is broken (but is disabled)
+           
+			/*
+             * The main issue is that it doesn't store the full reallocation chain for repeated reallocations
+             * 
+			if	( aItem.CellAddress == 0x00607ddc )
+			{
+				int x = 0;
+				x++;
+			}
+
+			// Locate the original allocation item...
+			MemObjStatisticalCollection collection = CollectionByCellAddress( aItem.OriginalCellAddress, TClass.EAllocation );
+			if	( collection != null )
+			{
+				// Find the item
+				MemOpBase item = collection.ItemByAddress( aItem.OriginalCellAddress, TClass.EAllocation );
+
+				// It should be an allocation item
+				System.Diagnostics.Debug.Assert( item is MemOpAllocation );
+
+				// Update it
+				MemOpAllocation allocItem = (MemOpAllocation) item;
+				allocItem.AllocationSize = aItem.AllocationSize;
+				allocItem.HeapSize = aItem.HeapSize;
+				allocItem.CellAddress = aItem.CellAddress;
+			}
+			else
+			{
+				// Its permissable to call Realloc to allocate first-time memory
+				// so its entirely possible that there wasn't any prior call to any of
+				// the 'pure' alloc functions.
+
+				// Add the item to our master list...
+				iAllItems.Add( aItem );
+                aItem.OperationIndex = iAllItems.Count;
+
+				// Locate the corresponding collection and also add the item there too
+                if ( aItem.LinkRegisterSymbol != null )
+				{
+					collection = CollectionBySymbol( aItem );
+					if	( collection == null )
+					{
+						// Make a new collection
+						collection = new MemObjStatisticalCollection();
+						iCollections.Add( collection );
+					}
+					collection.Add( aItem );
+				}
+			}
+			*/
+        }
+
+		public void AllItemsLocated()
+		{
+			// Sort the collection by number of items per sub-item
+			MemAnalysisStatisticalComparerByAllocationCount comparer = new MemAnalysisStatisticalComparerByAllocationCount();
+			iCollections.Sort( comparer );
+		}
+
+		public MemOpBase AllItemAt( int aIndex )
+		{
+			MemOpBase item = (MemOpBase) iAllItems[ aIndex ];
+			return item;
+		}
+
+		public MemObjStatisticalCollection CollectionAt( int aIndex )
+		{
+			MemObjStatisticalCollection ret = (MemObjStatisticalCollection) iCollections[ aIndex ];
+			return ret;
+		}
+
+		public MemObjStatisticalCollection CollectionByCellAddress( uint aCellAddress, TClass aClass )
+		{
+            MemObjStatisticalCollection ret = null;
+            //
+			int count = iAllItems.Count;
+			for( int i = count-1; i>=0; i-- )
+			{
+				MemOpBase item = (MemOpBase) iAllItems[ i ];
+                //
+                if ( item.CellAddress == aCellAddress )
+                {
+                    if ( aClass == TClass.ENotApplicable )
+                    {
+                        // Found the item, now locate its collection...
+                        ret = CollectionBySymbol( item );
+                        break;
+                    }
+                    else if ( aClass == item.Class )
+                    {
+                        // Found the item, now locate its collection...
+                        ret = CollectionBySymbol( item );
+                        break;
+                    }
+                }
+			}
+            //
+            return ret;
+		}
+
+        public MemObjStatisticalCollection CollectionByCellAddressSearchForwards( uint aCellAddress, TClass aClass )
+		{
+            MemObjStatisticalCollection ret = null;
+            //
+            int count = iAllItems.Count;
+			for( int i = 0; i<count; i++ )
+			{
+                MemOpBase item = (MemOpBase) iAllItems[ i ];
+                //
+                if ( item.CellAddress == aCellAddress )
+                {
+                    if ( aClass == TClass.ENotApplicable )
+                    {
+                        // Found the item, now locate its collection...
+                        ret = CollectionBySymbol( item );
+                        break;
+                    }
+                    else if ( aClass == item.Class )
+                    {
+                        // Found the item, now locate its collection...
+                        ret = CollectionBySymbol( item );
+                        break;
+                    }
+                }
+            }
+            //
+            return ret;
+        }
+
+        public MemObjStatisticalCollection CollectionBySymbol( MemOpBase aItem )
+        {
+			System.Diagnostics.Debug.Assert( aItem.IsAllocationType || aItem.IsReallocationType );
+            //
+			MemOpAllocation allocObject = (MemOpAllocation) aItem;
+            MemObjStatisticalCollection ret = CollectionBySymbol( allocObject.LinkRegisterSymbol, allocObject.LinkRegisterAddress );
+            //
+            return ret;
+        }
+
+		public MemObjStatisticalCollection CollectionBySymbol( SymbolLib.Generics.GenericSymbol aSymbol, uint aAddress )
+		{
+			// We also need a symbol...
+			MemObjStatisticalCollection ret = null;
+			//
+            if ( aSymbol != null )
+			{
+				int count = iCollections.Count;
+				for( int i=0; i<count; i++ )
+				{
+					MemObjStatisticalCollection collection = (MemObjStatisticalCollection) iCollections[ i ];
+					if	( collection != iNullSymbolCollection )
+					{
+						System.Diagnostics.Debug.Assert( collection.Count > 0 );
+						MemOpAllocation compareToObject = (MemOpAllocation) collection[0];
+
+						// Comparing the link register address is a very specific match - therefore we
+						// prefer the slightly slower comparison against the symbol name. This prevents
+						// multiple entries in the list that come from the same symbol (but different 
+						// instruction address).. i.e. the allocation occurs within the same function,
+						// but a slightly different location.
+                        if ( compareToObject.LinkRegisterSymbol != null )
+						{
+                            if ( compareToObject.LinkRegisterSymbol.Symbol == aSymbol.Symbol )
+							{
+								ret = collection;
+								break;
+							}
+						}
+                        else if ( compareToObject.LinkRegisterAddress == aAddress )
+						{
+							// Symbols match, add it to this container
+							ret = collection;
+							break;
+						}
+					}
+				}
+			}
+			else
+			{
+				// Must be from the null symbol collection then.
+				ret = iNullSymbolCollection;
+			}
+			//
+			return ret;
+		}
+
+		public MemOpBase ItemByLineNumber( long aLineNumber )
+		{
+			int count = iAllItems.Count;
+			for( int i = count-1; i>=0; i-- )
+			{
+				MemOpBase item = (MemOpBase) iAllItems[ i ];
+				if	( item.LineNumber == aLineNumber )
+				{
+					return item;
+				}
+			}
+
+			return null;
+		}
+		#endregion
+
+		#region Properties
+		public int CollectionCount
+		{
+			get { return iCollections.Count; }
+		}
+		#endregion
+
+        #region CollectionManager Members
+        public void RemoveLastOperation()
+        {
+            int count = AllPriorOperationsCount;
+            if ( count > 0 )
+            {
+                AllPriorOperations.RemoveAt( count - 1 );
+                iLastOperation = LastOperation;
+            }
+        }
+
+        public void RemovePriorOperation( MemOpBase aItem )
+        {
+            /*
+            if ( aItem.CellAddress == 0xc8036684 )
+            {
+                int x = 0;
+                x++;
+            }
+            */
+            iAllItems.Remove( aItem );
+        }
+
+        public void AddNewPriorOperation( MemOpBase aItem )
+        {
+            iLastOperation = aItem;
+            AllPriorOperations.Add( aItem );
+            aItem.OperationIndex = AllPriorOperationsCount;
+        }
+
+        public void RemoveFromCollection( MemOpBase aItem )
+        {
+            int count = iCollections.Count;
+            for ( int i = count - 1; i >= 0; i-- )
+            {
+                MemObjStatisticalCollection collection = (MemObjStatisticalCollection) iCollections[ i ];
+                System.Diagnostics.Debug.Assert( collection.Count > 0 || collection == iNullSymbolCollection );
+                if ( collection.Remove( aItem ) )
+                {
+                    // Remove the collection as well (if its empty)
+                    if ( collection.Count == 0 )
+                    {
+                        iCollections.RemoveAt( i );
+                    }
+                    break;
+                }
+            }
+        }
+
+        public void AddToCollection( MemOpBase aItem, SymbolLib.Generics.GenericSymbol aSymbol, uint aLinkRegisterAddress )
+        {
+            MemObjStatisticalCollection collection = CollectionBySymbol( aSymbol, aLinkRegisterAddress );
+            if ( collection == null )
+            {
+                // Make a new collection
+                collection = new MemObjStatisticalCollection();
+                iCollections.Add( collection );
+            }
+
+            collection.Add( aItem );
+        }
+
+        public MemOpBase PriorOperationByAllocationNumber( uint aAllocNumber )
+        {
+            MemOpBase ret = null;
+            //
+            for ( int i = AllPriorOperationsCount - 1; i >= 0; i-- )
+            {
+                MemOpBase op = AllPriorOperations[ i ];
+                //
+                if ( op.AllocationNumber == aAllocNumber )
+                {
+                    ret = op;
+                    break;
+                }
+            }
+            //
+            return ret;
+        }
+
+        public MemOpBase LastOperation
+        {
+            get
+            {
+                MemOpBase ret = null;
+                //
+                if ( AllPriorOperationsCount > 0 )
+                {
+                    ret = AllPriorOperations[ AllPriorOperationsCount - 1 ];
+                }
+                //
+                return ret;
+            }
+        }
+
+        public int AllPriorOperationsCount
+        {
+            get { return iAllItems.Count; }
+        }
+
+        public List<MemOpBase> AllPriorOperations
+        {
+            get { return iAllItems; }
+        }
+        #endregion
+
+		#region Data members
+        private MemOpBase iLastOperation = new MemOpFree();
+        private List<MemOpBase> iAllItems = new List<MemOpBase>( 5000 );
+		private List<MemObjStatisticalCollection> iCollections = new List<MemObjStatisticalCollection>( 100 );
+		private MemObjStatisticalCollection iNullSymbolCollection = new MemObjStatisticalCollection();
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Class/MemOpClass.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+
+namespace MemAnalysisLib.MemoryOperations.Class
+{
+	public enum TClass
+	{
+		ENotApplicable = -1,
+		EAllocation = 0,
+		EDeallocation,
+		EReallocation
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnAllocations.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.Kernel
+{
+    internal abstract class MemOpFnKAllocBase : MemOpFnKBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnKAllocBase()
+		{
+		}
+
+        protected MemOpFnKAllocBase( MemOpFnKAllocBase aChainedFunction )
+            : base( aChainedFunction )
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override MemAnalysisLib.MemoryOperations.Class.TClass Class
+        {
+            get { return TClass.EAllocation; } 
+        }
+
+        public override MemOpBase Parse( ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            MemOpAllocation ret = new MemOpAllocation();
+            
+            // Parse fields
+            base.ParseCommonKernel( ret, ref aLine, aPrefixes );
+            ParseCommonAlloc( ret, ref aLine, aPrefixes );
+
+            // Set type
+            ret.Function = this;
+
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        protected void ParseCommonAlloc( MemOpAllocation aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            if ( aLine.IndexOf( aPrefixes.AllocSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.AllocSize, ref aLine );
+                aOperation.AllocationSize = PrefixParser.ReadUint( ref aLine );
+            }
+        }
+        #endregion
+    }
+
+    internal class MemOpFnNew : MemOpFnKAllocBase
+	{
+		#region Constructors & destructor
+        public MemOpFnNew()
+            : base( new MemOpFnKernAlloc() )
+        {
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "op. new";
+        }
+		#endregion
+	}
+
+    internal class MemOpFnNewArray : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnNewArray()
+            : base( new MemOpFnKernAlloc() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "op. new[]";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnNewExtraSize : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnNewExtraSize()
+            : base( new MemOpFnKernAlloc() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "op. new";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnNewNoThrow : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnNewNoThrow()
+            : base( new MemOpFnKernAlloc() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "op. new";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnNewNoThrowArray : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnNewNoThrowArray()
+            : base( new MemOpFnKernAlloc() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "op. new";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnNewDBase : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnNewDBase()
+            : base( new MemOpFnKernAllocZ() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "DBase::op. new";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnNewDBaseExtraSize : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnNewDBaseExtraSize()
+             : base( new MemOpFnKernAllocZ() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "DBase::op. new";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnNewTProperty : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnNewTProperty()
+            : base( new MemOpFnKernAllocZ() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "TProperty::op. new";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnKernAlloc : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnKernAlloc()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Kern::Alloc";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnKernAllocZ : MemOpFnKAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnKernAllocZ()
+            : base( new MemOpFnKernAlloc() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Kern::AllocZ";
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnFrees.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,166 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.Kernel
+{
+    internal abstract class MemOpFnKFreeBase : MemOpFnKBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnKFreeBase()
+		{
+		}
+
+        protected MemOpFnKFreeBase( MemOpFnKFreeBase aChainedFunction )
+            : base( aChainedFunction )
+        {
+        }
+        #endregion
+
+		#region From MemOpFnBase
+        public override MemAnalysisLib.MemoryOperations.Class.TClass Class
+        {
+            get { return TClass.EDeallocation; } 
+        }
+
+        public override MemOpBase Parse( ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            MemOpFree ret = new MemOpFree();
+
+            // Parse fields
+            base.ParseCommonKernel( ret, ref aLine, aPrefixes );
+
+            // Set type
+            ret.Function = this;
+
+            return ret;
+        }
+        #endregion
+    }
+
+    internal class MemOpFnDel : MemOpFnKFreeBase
+	{
+		#region Constructors & destructor
+        public MemOpFnDel()
+            : base( new MemOpFnKernFree() )
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "op. delete";
+        }
+		#endregion
+	}
+
+    internal class MemOpFnDelArray : MemOpFnKFreeBase
+    {
+        #region Constructors & destructor
+        public MemOpFnDelArray()
+            : base( new MemOpFnKernFree() )
+		{
+		}
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "op. delete[]";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnDelDBase : MemOpFnKFreeBase
+    {
+        #region Constructors & destructor
+        public MemOpFnDelDBase()
+            : base ( new MemOpFnDel() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "DBase::op. delete";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnDelTProperty : MemOpFnKFreeBase
+    {
+        #region Constructors & destructor
+        public MemOpFnDelTProperty()
+            : base ( new MemOpFnDel() )
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "TProperty::Release";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnKernFree : MemOpFnKFreeBase
+    {
+        #region Constructors & destructor
+        public MemOpFnKernFree()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Kern::Free";
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnKBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.Kernel
+{
+    internal abstract class MemOpFnKBase : MemOpFnBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnKBase()
+		{
+		}
+        
+        protected MemOpFnKBase( MemOpFnKBase aChainedFunction )
+            : base( aChainedFunction )
+        {
+        }
+        #endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return string.Empty;
+        }
+        #endregion
+
+        #region Internal methods
+        protected void ParseCommonKernel( MemOpBase aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            string line = aLine;
+            //
+            if ( line.IndexOf( aPrefixes.CellAddress ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.CellAddress, ref line );
+                aOperation.CellAddress = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.HeapSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.HeapSize, ref line );
+                aOperation.HeapSize = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.ChunkSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.ChunkSize, ref line );
+                aOperation.ChunkSize = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.LinkRegister ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.LinkRegister, ref line );
+                aOperation.LinkRegisterAddress = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.CellSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.CellSize, ref line );
+                aOperation.CellSize = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.AllocNumber ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.AllocNumber, ref line );
+                try
+                {
+                    aOperation.AllocationNumber = PrefixParser.ReadUint( ref line );
+                }
+                catch ( Exception )
+                {
+                }
+            }
+            if ( line.IndexOf( aPrefixes.VTable ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.VTable, ref line );
+                aOperation.VTable = PrefixParser.ReadUint( ref line );
+            }
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/Kernel/MemOpFnReallocations.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,248 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.Interfaces;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.Kernel
+{
+    internal abstract class MemOpFnKReallocBase : MemOpFnKAllocBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnKReallocBase()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override MemAnalysisLib.MemoryOperations.Class.TClass Class
+        {
+            get { return TClass.EReallocation; } 
+        }
+
+        public override MemOpBase Parse( ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            MemOpReallocation ret = new MemOpReallocation();
+
+            // Parse fields
+            base.ParseCommonKernel( ret, ref aLine, aPrefixes );
+            base.ParseCommonAlloc( ret, ref aLine, aPrefixes );
+            ParseCommonRealloc( ret, ref aLine, aPrefixes );
+
+            // Set type
+            ret.Function = this;
+
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        protected void ParseCommonRealloc( MemOpReallocation aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            if ( aLine.IndexOf( aPrefixes.ReallocMode ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.ReallocMode, ref aLine );
+                aOperation.ReallocationMode = (byte) PrefixParser.ReadLong( ref aLine );
+            }
+            if ( aLine.IndexOf( aPrefixes.OriginalCellAddress ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.OriginalCellAddress, ref aLine );
+                aOperation.OriginalAddress = PrefixParser.ReadUint( ref aLine );
+            }
+            if ( aLine.IndexOf( aPrefixes.OriginalCellSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.OriginalCellSize, ref aLine );
+                aOperation.OriginalAllocationSize = PrefixParser.ReadUint( ref aLine );
+            }
+            if ( aLine.IndexOf( aPrefixes.OriginalCellAllocNumber ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.OriginalCellAllocNumber, ref aLine );
+                aOperation.OriginalAllocationNumber = PrefixParser.ReadUint( ref aLine );
+            }
+        }
+        #endregion
+    }
+
+    internal class MemOpFnKernReAlloc : MemOpFnKReallocBase
+	{
+		#region Constructors & destructor
+        public MemOpFnKernReAlloc()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Kern::ReAlloc";
+        }
+		#endregion
+	}
+
+    internal class MemOpFnKernSafeReAlloc : MemOpFnKReallocBase
+	{
+		#region Constructors & destructor
+        public MemOpFnKernSafeReAlloc()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Kern::SafeReAlloc";
+        }
+
+        public override void Process( MemOpBase aItem, CollectionManager aCollectionManager )
+        {
+            if ( aItem.CellAddress == 0xc8099f8c )
+            {
+                int x = 0;
+                x++;
+            }
+
+            // (1) Alloc, SafeRealloc
+            // 
+            // [KMEM] OKA     - C: 0xc801a65c, HS:    29096, HCS:    53128, LR: 0x800b82f4, CS:        4, AS:        4, AN:       93
+            // [KMEM] OKSR    - C: 0xc801a65c, HS:    29096, HCS:    53128, LR: 0x800aebdc, AS:        4, AN:       93, OC: 0x00000000, OCS:        0, OCAN:        0, VT: 0x00000000
+            // 
+            // 
+            // (2) Realloc, SafeRealloc
+            // [KMEM] OKR     - C: 0xc801ae1c, HS:    33656, HCS:    53128, LR: 0x800b82d4, AS:       12, AN:      106, MD: 1, OC: 0xc801ae1c, OCS:       12, OCAN:      106, VT: 0xc801a688
+            // [KMEM] OKSR    - C: 0xc801ae1c, HS:    33656, HCS:    53128, LR: 0x800aebdc, AS:       12, AN:      106, OC: 0xc801ae1c, OCS:       12, OCAN:      106, VT: 0xc801a688
+            // ...
+            // [KMEM] OKR     - C: 0xc822ee8c, HS:  1672036, HCS:  2236296, LR: 0x800b83c8 [ Kern::SafeReAlloc(void*&, int, int) ], CS:      660, AS:      652, AN:    99936, MD: 0, OC: 0xc822ee8c, OCS:      660, OCAN:    99936, VT: 0xc80131e8
+            // [KMEM] OKSR    - C: 0xc822ee8c, HS:  1672036, HCS:  2236296, LR: 0x800adc7c [ DObjectCon::Remove(DObject*) ], CS:      660, AS:      652, AN:    99936, OC: 0xc822ee8c, OCS:      660, OCAN:    99936, VT: 0xc80131e8
+            // 
+            //
+            // (3) Alloc, Free, SafeRealloc
+            //
+            // [KMEM] OKA     - C: 0xc801a744, HS:    29268, HCS:    53128, LR: 0x800b82f4, CS:        4, AS:        4, AN:       98
+            // [KMEM] OKSR    - C: 0xc801a744, HS:    29268, HCS:    53128, LR: 0x800aebdc, AS:        4, AN:       98, OC: 0x00000000, OCS:        0, OCAN:        0, VT: 0x00000000
+            // ...
+            // [KMEM] OKA     - C: 0xc801ae1c, HS:    30932, HCS:    53128, LR: 0x800b82f4, CS:       12, AS:        8, AN:      106
+            // [KMEM] OKF     - C: 0xc801a744, HS:    30928, HCS:    53128, LR: 0x800b836c, CS:        4, AN:       98, VT: 0xc801a688
+            // [KMEM] OKSR    - C: 0xc801ae1c, HS:    30928, HCS:    53128, LR: 0x800aebdc, AS:        8, AN:      106, OC: 0xc801a744, OCS:        4, OCAN:       98, VT: 0xc801a688
+
+            MemOpBase lastOpByAllocNumber = aCollectionManager.PriorOperationByAllocationNumber( aItem.AllocationNumber );
+            MemOpReallocation op = (MemOpReallocation) aItem;
+
+            if ( lastOpByAllocNumber != null )
+            {
+                if ( lastOpByAllocNumber.CellAddress == op.CellAddress &&
+                     lastOpByAllocNumber.Class == TClass.EAllocation &&
+                     op.OriginalAddress == 0 )
+                {
+                    // 1) Alloc, SafeRealloc => dump alloc
+                    aCollectionManager.RemoveFromCollection( lastOpByAllocNumber );
+                    aCollectionManager.RemovePriorOperation( lastOpByAllocNumber );
+                    aCollectionManager.AddToCollection( op, op.LinkRegisterSymbol, op.LinkRegisterAddress );
+                    aCollectionManager.AddNewPriorOperation( op );
+                }
+                else if ( lastOpByAllocNumber.Class == TClass.EReallocation && lastOpByAllocNumber.CellAddress == op.CellAddress )
+                {
+                    // 2) Realloc, SafeRealloc => dump realloc
+                    aCollectionManager.RemoveFromCollection( lastOpByAllocNumber );
+                    aCollectionManager.RemovePriorOperation( lastOpByAllocNumber );
+
+                    // Also, it's possible that this is just a no-op. For example, this pattern can occur when removing
+                    // an object from a DObjectCon, in which case the DObjectCon code requests that the cell be shrunk in size.
+                    //
+                    // If there is no cell growth, then we shouldn't bother saving the operation.
+                    int impact = (int) op.AllocationSize - (int) op.OriginalAllocationSize;
+                    if ( impact > 0 )
+                    {
+                        aCollectionManager.AddToCollection( op, op.LinkRegisterSymbol, op.LinkRegisterAddress );
+                        aCollectionManager.AddNewPriorOperation( op );
+                    }
+                }
+                else
+                {
+                    // Checking for scenario (3)
+                    //
+                    // lastOpByAllocNumber will correspond to the 'alloc' operation. 
+                    if ( lastOpByAllocNumber.Class == TClass.EAllocation &&
+                         lastOpByAllocNumber.CellAddress == op.CellAddress ) // Satisfies linkage between OKSR and OKA
+                    {
+                        // We need to find out what the prior op was for the original cell allocation number. 
+                        // This should point to the 'free' operation.
+                        MemOpBase freeOp = aCollectionManager.PriorOperationByAllocationNumber( op.OriginalAllocationNumber );
+
+                        // If we're throwing away matching allocated & subsequently freed cells, then freeOp will be null...
+                        if ( freeOp == null || ( freeOp.Class == TClass.EDeallocation && freeOp.CellAddress == op.OriginalAddress ) )
+                        {
+                            // (3) Alloc, Free, SafeRealloc => dump alloc and free!
+
+                            // Remove alloc, which is replaced by our new SafeRealloc entry
+                            aCollectionManager.RemovePriorOperation( lastOpByAllocNumber );
+                            aCollectionManager.RemoveFromCollection( lastOpByAllocNumber );
+
+                            // Remove free for the old SafeRealloc heap cell
+                            if ( freeOp != null )
+                            {
+                                aCollectionManager.RemovePriorOperation( freeOp );
+                                aCollectionManager.RemoveFromCollection( freeOp );
+
+                                // We may also need to remove a prior SafeRealloc that uses the same heap cell
+                                MemOpBase safeReallocForDeletedCell = aCollectionManager.PriorOperationByAllocationNumber( freeOp.AllocationNumber );
+                                if ( safeReallocForDeletedCell.Class == TClass.EReallocation && safeReallocForDeletedCell.CellAddress == freeOp.CellAddress )
+                                {
+                                    // Remove prior realloc associated with the old heap cell
+                                    aCollectionManager.RemovePriorOperation( safeReallocForDeletedCell );
+                                    aCollectionManager.RemoveFromCollection( safeReallocForDeletedCell );
+                                }
+                            }
+                            
+                            // Now add our new SafeRealloc entry to the master list
+                            aCollectionManager.AddToCollection( op, op.LinkRegisterSymbol, op.LinkRegisterAddress );
+                            aCollectionManager.AddNewPriorOperation( op );
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/MemOpFnBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.Interfaces;
+
+namespace MemAnalysisLib.MemoryOperations.Functions
+{
+    internal abstract class MemOpFnBase
+	{
+		#region Constructors & destructor
+        protected MemOpFnBase()
+		{
+		}
+
+        protected MemOpFnBase( MemOpFnBase aChainedFunction )
+        {
+            iChainedFunction = aChainedFunction;
+        }
+		#endregion
+
+        #region API
+        public abstract MemOpBase Parse( ref string aLine, MemAnalysisParserPrefixesBase aPrefixes );
+
+        public virtual void Process( MemOpBase aOperation, CollectionManager aCollectionManager )
+        {
+        }
+
+        public virtual string ToString( MemOpBase aOperation )
+        {
+            string ret = string.Empty;
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public abstract MemAnalysisLib.MemoryOperations.Class.TClass Class
+        {
+            get;
+        }
+
+        public MemOpFnBase ChainedFunction
+        {
+            get { return iChainedFunction; }
+        }
+		#endregion
+
+        #region Data members
+        private MemOpFnBase iChainedFunction;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnAllocations.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,169 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.User
+{
+    internal abstract class MemOpFnUAllocBase : MemOpFnUBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnUAllocBase()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override MemAnalysisLib.MemoryOperations.Class.TClass Class
+        {
+            get { return TClass.EAllocation; } 
+        }
+
+        public override MemOpBase Parse( ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            MemOpAllocation ret = new MemOpAllocation();
+            
+            // Parse fields
+            base.ParseCommonUser( ret, ref aLine, aPrefixes );
+            ParseCommonAlloc( ret, ref aLine, aPrefixes );
+
+            // Set type
+            ret.Function = this;
+
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        protected void ParseCommonAlloc( MemOpAllocation aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            if ( aLine.IndexOf( aPrefixes.AllocSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.AllocSize, ref aLine );
+                aOperation.AllocationSize = PrefixParser.ReadUint( ref aLine );
+            }
+        }
+        #endregion
+    }
+
+    internal class MemOpFnUA : MemOpFnUAllocBase
+	{
+		#region Constructors & destructor
+        public MemOpFnUA()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Alloc()";
+        }
+		#endregion
+	}
+
+    internal class MemOpFnUAL : MemOpFnUAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnUAL()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "AllocL()";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnUALC : MemOpFnUAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnUALC()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "AllocLC()";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnUAZ : MemOpFnUAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnUAZ()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "AllocZ()";
+        }
+        #endregion
+    }
+
+    internal class MemOpFnUAZL : MemOpFnUAllocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnUAZL()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "AllocZL()";
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnFrees.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.User
+{
+    internal abstract class MemOpFnUFreeBase : MemOpFnUBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnUFreeBase()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override MemAnalysisLib.MemoryOperations.Class.TClass Class
+        {
+            get { return TClass.EDeallocation; } 
+        }
+
+        public override MemOpBase Parse( ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            MemOpFree ret = new MemOpFree();
+
+            // Parse fields
+            base.ParseCommonUser( ret, ref aLine, aPrefixes );
+
+            // Set type
+            ret.Function = this;
+
+            return ret;
+        }
+        #endregion
+    }
+
+    internal class MemOpFnUF : MemOpFnUFreeBase
+	{
+		#region Constructors & destructor
+        public MemOpFnUF()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Free()";
+        }
+		#endregion
+	}
+
+    internal class MemOpFnUFZ : MemOpFnUFreeBase
+    {
+        #region Constructors & destructor
+        public MemOpFnUFZ()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "FreeZ()";
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnReallocations.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.User
+{
+    internal abstract class MemOpFnUReallocBase : MemOpFnUBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnUReallocBase()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override MemAnalysisLib.MemoryOperations.Class.TClass Class
+        {
+            get { return TClass.EReallocation; } 
+        }
+
+        public override MemOpBase Parse( ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            MemOpReallocation ret = new MemOpReallocation();
+
+            // Parse fields
+            base.ParseCommonUser( ret, ref aLine, aPrefixes );
+            ParseCommonRealloc( ret, ref aLine, aPrefixes );
+
+            // Set type
+            ret.Function = this;
+
+            return ret;
+        }
+        #endregion
+
+        #region Internal methods
+        protected void ParseCommonRealloc( MemOpReallocation aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            if ( aLine.IndexOf( aPrefixes.ReallocMode ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.ReallocMode, ref aLine );
+                aOperation.ReallocationMode = (byte) PrefixParser.ReadLong( ref aLine );
+            }
+            if ( aLine.IndexOf( aPrefixes.OriginalCellAddress ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.OriginalCellAddress, ref aLine );
+                aOperation.OriginalAddress = PrefixParser.ReadUint( ref aLine );
+            }
+            if ( aLine.IndexOf( aPrefixes.OriginalCellSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.OriginalCellSize, ref aLine );
+                aOperation.OriginalAllocationSize = PrefixParser.ReadUint( ref aLine );
+            }
+            if ( aLine.IndexOf( aPrefixes.OriginalCellAllocNumber ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.OriginalCellAllocNumber, ref aLine );
+                aOperation.OriginalAllocationNumber = PrefixParser.ReadUint( ref aLine );
+            }
+        }
+        #endregion
+    }
+
+    internal class MemOpFnUR : MemOpFnUReallocBase
+	{
+		#region Constructors & destructor
+        public MemOpFnUR()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "Realloc()";
+        }
+		#endregion
+	}
+
+    internal class MemOpFnURL : MemOpFnUReallocBase
+    {
+        #region Constructors & destructor
+        public MemOpFnURL()
+        {
+        }
+        #endregion
+
+        #region From MemOpFnBase
+        public override string ToString()
+        {
+            return base.ToString() + "ReallocL()";
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Functions/User/MemOpFnUBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Operations;
+using SymbianUtils;
+
+namespace MemAnalysisLib.MemoryOperations.Functions.User
+{
+    internal abstract class MemOpFnUBase : MemOpFnBase
+    {
+		#region Constructors & destructor
+        protected MemOpFnUBase()
+		{
+		}
+		#endregion
+
+		#region From MemOpFnBase
+        public override string ToString()
+        {
+            return "User::";
+        }
+		#endregion
+
+        #region Internal methods
+        protected void ParseCommonUser( MemOpBase aOperation, ref string aLine, MemAnalysisParserPrefixesBase aPrefixes )
+        {
+            string line = aLine;
+            //
+            if ( line.IndexOf( aPrefixes.CellAddress ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.CellAddress, ref line );
+                aOperation.CellAddress = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.HeapSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.HeapSize, ref line );
+                aOperation.HeapSize = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.ChunkSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.ChunkSize, ref line );
+                aOperation.ChunkSize = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.LinkRegister ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.LinkRegister, ref line );
+                aOperation.LinkRegisterAddress = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.CellSize ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.CellSize, ref line );
+                aOperation.CellSize = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.AllocNumber ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.AllocNumber, ref line );
+                aOperation.AllocationNumber = PrefixParser.ReadUint( ref line );
+            }
+            if ( line.IndexOf( aPrefixes.VTable ) >= 0 )
+            {
+                PrefixParser.SkipPrefix( aPrefixes.VTable, ref line );
+                aOperation.VTable = PrefixParser.ReadUint( ref line );
+            }
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpAllocation.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+
+namespace MemAnalysisLib.MemoryOperations.Operations
+{
+    public class MemOpAllocation : MemOpBase
+    {
+        #region Constructors & destructor
+        public MemOpAllocation()
+        {
+        }
+        #endregion
+
+        #region Properties
+        public uint AllocationSize
+        {
+            get { return iAllocationSize; }
+            set { iAllocationSize = value; }
+        }
+
+        public uint AllocationSizeWordAligned
+        {
+            get
+            {
+                uint ret = AllocationSize;
+
+                // Calculate actual allocation size by rounding upwards to nearest 4 byte
+                uint remainder = ret % 4;
+                if ( remainder != 0 )
+                {
+                    ret = ( ret - remainder ) + 4;
+                }
+
+                return ret;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private uint iAllocationSize;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,233 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+
+namespace MemAnalysisLib.MemoryOperations.Operations
+{
+	public abstract class MemOpBase
+	{
+		#region Constructors & destructor
+        public MemOpBase()
+		{
+		}
+		#endregion
+
+        #region From System.Object
+        public override string ToString()
+        {
+            string ret = "[" + LineNumber.ToString( "d8" ) + "] 0x" + CellAddress.ToString( "x8" ) + " " + FunctionName;
+            return ret;
+        }
+        #endregion
+
+		#region Type-related properties
+		public bool IsAllocationType
+		{
+			get
+			{
+				return ( Class == TClass.EAllocation || Class == TClass.EReallocation );
+			}
+		}
+
+		public bool IsDeallocationType
+		{
+			get
+			{
+				return ( Class == TClass.EDeallocation );
+			}
+		}
+
+		public bool IsReallocationType
+		{
+			get
+			{
+				return ( Class == TClass.EReallocation );
+			}
+		}
+        #endregion
+
+        #region General properties
+        public string FunctionName
+        {
+            get { return Function.ToString(); }
+        }
+
+        internal MemOpFnBase Function
+		{
+			get { return iFunction; }
+			set { iFunction = value; }
+		}
+
+		public TClass Class
+		{
+			get
+			{
+                TClass ret = TClass.ENotApplicable;
+				//
+                if ( Function != null )
+                {
+                    ret = Function.Class;
+                }
+                //
+                return ret;
+			}
+		}
+
+        public uint LineNumber
+		{
+			get { return iLineNumber; }
+			set { iLineNumber = value; }
+		}
+
+		public uint CellAddress
+		{
+			get { return iCellAddress; }
+			set { iCellAddress = value; }
+		}
+
+        public uint CellSize
+        {
+            get { return iCellSize; }
+            set { iCellSize = value; }
+        }
+
+        public uint AllocationNumber
+        {
+            get { return iAllocationNumber; }
+            set { iAllocationNumber = value; }
+        }
+
+		public uint HeapSize
+		{
+			get { return iHeapSize; }
+			set { iHeapSize = value; }
+		}
+
+		public uint ChunkSize
+		{
+            get { return iChunkSize; }
+            set { iChunkSize = value; }
+		}
+
+        public uint VTable
+		{
+            get { return iVTable; }
+            set { iVTable = value; }
+		}
+
+		public int OperationIndex
+		{
+			get { return iOperationIndex; }
+			set { iOperationIndex = value; }
+		}
+
+        public MemOpBase Link
+		{
+			get { return iLink; }
+			set { iLink = value; }
+		}
+
+		public object Collection
+		{
+			get { return iCollection; }
+			set { iCollection = value; }
+		}
+
+        public uint LinkRegisterAddress
+        {
+            get { return iLinkRegisterAddress; }
+            set { iLinkRegisterAddress = value; }
+        }
+
+        public GenericSymbol LinkRegisterSymbol
+        {
+            get { return iLinkRegisterSymbol; }
+        }
+
+        public GenericSymbol VTableSymbol
+        {
+            get { return iVTableSymbol; }
+        }
+        #endregion
+
+        #region Abstract API
+        public virtual void Finalise( SymbolLib.Engines.SymbolManager aSymbolManager )
+        {
+            iLinkRegisterSymbol = SymbolForAddress( LinkRegisterAddress, aSymbolManager );
+            iVTableSymbol = SymbolForAddress( VTable, aSymbolManager );
+        }
+        #endregion
+
+        #region Internal methods
+        private GenericSymbol SymbolForAddress( uint aAddress, SymbolManager aSymbolManager )
+        {
+            System.Diagnostics.Debug.Assert( aSymbolManager != null );
+
+            // Try and find a matching collection / symbol entry
+            GenericSymbolCollection collection;
+            GenericSymbol symbol = aSymbolManager.EntryByAddress( aAddress, out collection );
+            return symbol;
+        }
+        #endregion
+
+		#region Data members
+        private int iOperationIndex;
+		private uint iCellAddress;
+		private uint iHeapSize;
+        private uint iChunkSize;
+        private uint iAllocationNumber;
+        private uint iAllocationSize;
+        private uint iCellSize;
+		private uint iLineNumber;
+        private uint iVTable;
+		private MemOpFnBase iFunction = null;
+		private MemOpBase iLink = null;
+		private object iCollection = null;
+        private uint iLinkRegisterAddress;
+        private GenericSymbol iLinkRegisterSymbol;
+        private GenericSymbol iVTableSymbol;
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpFree.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+
+namespace MemAnalysisLib.MemoryOperations.Operations
+{
+    public class MemOpFree : MemOpBase
+    {
+		#region Constructors & destructor
+        public MemOpFree()
+		{
+		}
+		#endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/MemoryOperations/Operations/MemOpReallocation.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,90 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Class;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+
+namespace MemAnalysisLib.MemoryOperations.Operations
+{
+    public class MemOpReallocation : MemOpAllocation
+    {
+		#region Constructors & destructor
+        public MemOpReallocation()
+		{
+		}
+		#endregion
+
+        #region Properties
+        public uint OriginalAddress
+		{
+            get { return iOriginalAddress; }
+            set { iOriginalAddress = value; }
+		}
+
+        public uint OriginalAllocationSize
+		{
+			get { return iOriginalAllocationSize; }
+			set { iOriginalAllocationSize = value; }
+		}
+
+        public uint OriginalAllocationNumber
+		{
+            get { return iOriginalAllocationNumber; }
+            set { iOriginalAllocationNumber = value; }
+		}
+
+		public byte ReallocationMode
+		{
+			get { return iReallocationMode; }
+			set { iReallocationMode = value; }
+		}
+		#endregion
+
+		#region Data members
+        private uint iOriginalAddress;
+        private uint iOriginalAllocationSize;
+        private uint iOriginalAllocationNumber;
+		private byte iReallocationMode;
+		#endregion	
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Base/MemAnalysisParserBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.Parser.Options;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.MemoryOperations.Functions;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+using SymbianUtils;
+
+namespace MemAnalysisLib.Parser.Base
+{
+	public abstract class MemAnalysisParserBase : AsyncTextFileReader
+	{
+		#region Constructors & destructor
+		public MemAnalysisParserBase( MemAnalysisParserOptions aOptions, SymbolManager aSymbolManager )
+			: base( aOptions.SourceFileName, new AsyncTextReaderPrefix( aOptions.TracePrefix ) )
+		{
+			iOptions = aOptions;
+			iSymbolManager = aSymbolManager;
+			//
+			if	( aOptions.SpecificThreadFilter != string.Empty )
+			{
+				AddFilter( new SymbianUtils.AsyncTextReaderFilter( aOptions.SpecificThreadFilter ) );
+			}
+		}
+		#endregion
+
+        #region API
+        public void Parse()
+        {
+            base.AsyncRead();
+        }
+        #endregion
+
+        #region Properties
+        public SymbolManager SymbolManager
+		{
+			get { return iSymbolManager; }
+		}
+
+		public MemAnalysisParserOptions Options
+		{
+			get { return iOptions; }
+		}
+
+		public MemAnalysisParserPrefixesBase Prefixes
+		{
+			get { return iOptions.Prefixes; }
+		}
+		#endregion
+
+		#region New Framework Methods
+		protected abstract void HandleOpAllocation( MemOpAllocation aObject );
+		protected abstract void HandleOpFree( MemOpFree aObject );
+		protected abstract void HandleOpReallocation( MemOpReallocation aObject );
+		#endregion
+
+		#region From AsyncTextReader - Parsing related
+		protected override void HandleFilteredLine( string aLine )
+		{
+			if	( aLine != null )
+			{
+                MemOpBase operation = null;
+                MemOpFnBase function = null;
+                //
+                bool handled = Prefixes.MatchesPrefix( ref aLine, out function );
+                if ( handled && function != null )
+                {
+                    operation = function.Parse( ref aLine, Prefixes );
+                    if ( operation != null )
+                    {
+                        // Finalise it
+                        operation.LineNumber = System.Convert.ToUInt32( LineNumber );
+                        operation.Finalise( SymbolManager );
+
+                        // Notify
+                        switch ( function.Class )
+                        {
+                        case MemAnalysisLib.MemoryOperations.Class.TClass.EAllocation:
+                            HandleOpAllocation( operation as MemOpAllocation );
+                            break;
+                        case MemAnalysisLib.MemoryOperations.Class.TClass.EDeallocation:
+                            HandleOpFree( operation as MemOpFree );
+                            break;
+                        case MemAnalysisLib.MemoryOperations.Class.TClass.EReallocation:
+                            HandleOpReallocation( operation as MemOpReallocation );
+                            break;
+                        default:
+                            break;
+                        }
+                    }
+                }
+			}
+		}
+
+		protected override void HandleReadCompleted()
+		{
+			base.HandleReadCompleted();
+		}
+
+		protected override void HandleReadException( Exception aException )
+		{
+			base.HandleReadException( aException );
+		}
+		#endregion
+
+		#region Data members
+		private readonly SymbolManager iSymbolManager;
+		private readonly MemAnalysisParserOptions iOptions;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Implementations/MemAnalysisRegionalParser.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Base;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.Parser.Options;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.MemoryOperations.Functions;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+using SymbianUtils;
+
+namespace MemAnalysisLib.Parser.Implementations
+{
+	public class MemAnalysisRegionalParser : MemAnalysisParserBase
+	{
+		#region Constructors & destructor
+		public MemAnalysisRegionalParser( MemAnalysisParserOptions aOptions, SymbolManager aSymbolManager )
+			: base( aOptions, aSymbolManager )
+		{
+		}
+		#endregion
+
+		#region Properties
+		public MemObjRegionalData Data
+		{
+			get { return iData; }
+		}
+		#endregion
+
+		#region From AsyncTextReader - Parsing related
+		protected override void HandleFilteredLine( string aLine )
+		{
+			if	( aLine != null )
+			{
+				/*
+				if	( LineNumber == 45244 )
+				{
+					int x = 0;
+					x++;
+				}
+				*/
+
+				// Check for a region match
+				if ( aLine.Length >= Options.MarkerTextEnd.Length && aLine.IndexOf( Options.MarkerTextEnd ) >= 0 )
+				{
+					int pos = aLine.IndexOf( Options.MarkerTextEnd );
+					string marker = aLine.Substring( pos );
+					//
+					if	( Options.MarkerTextToBeStripped )
+					{
+						marker = aLine.Substring( pos + Options.MarkerTextEnd.Length );
+					}
+					//
+					iData.MarkerEndIdentified( marker, LineNumber );
+				}
+				else if	( aLine.Length >= Options.MarkerTextStart.Length && aLine.IndexOf( Options.MarkerTextStart ) >= 0 )
+				{
+					int pos = aLine.IndexOf( Options.MarkerTextStart );
+					string marker = aLine.Substring( pos );
+					//
+					if	( Options.MarkerTextToBeStripped )
+					{
+						marker = aLine.Substring( pos + Options.MarkerTextStart.Length );
+					}
+					//
+					iData.MarkerStartIdentified( marker, LineNumber );
+				}
+				else
+				{
+					base.HandleFilteredLine( aLine );
+				}
+			}
+		}
+
+		protected override void HandleReadCompleted()
+		{
+			try
+			{
+				iData.AllItemsLocated( LineNumber );
+			}
+			finally
+			{
+				base.HandleReadCompleted();
+			}
+		}
+		#endregion
+
+		#region From MemAnalysisParserBase
+        protected override void HandleOpAllocation( MemOpAllocation aObject )
+		{
+			iData.Add( aObject, Options.DiscardMatchingAllocsAndFrees );
+		}
+
+        protected override void HandleOpFree( MemOpFree aObject )
+		{
+			iData.Add( aObject, Options.DiscardMatchingAllocsAndFrees );
+		}
+
+        protected override void HandleOpReallocation( MemOpReallocation aObject )
+		{
+			iData.Add( aObject );
+		}
+		#endregion
+
+		#region Data members
+		private MemObjRegionalData iData = new MemObjRegionalData();
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Implementations/MemAnalysisStatisticalParser.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using MemAnalysisLib.Parser.Base;
+using MemAnalysisLib.Parser.Options;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.MemoryOperations.Functions;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+using SymbianUtils;
+
+namespace MemAnalysisLib.Parser.Implementations
+{
+	public class MemAnalysisStatisticalParser : MemAnalysisParserBase
+	{
+		#region Constructors & destructor
+		public MemAnalysisStatisticalParser( MemAnalysisParserOptions aOptions, SymbolManager aSymbolManager )
+			: base( aOptions, aSymbolManager )
+		{
+		}
+		#endregion
+
+		#region Properties
+		public MemObjStatisticalData Data
+		{
+			get { return iData; }
+		}
+		#endregion
+
+		#region From AsyncTextReader - Parsing related
+		protected override void HandleReadCompleted()
+		{
+			try
+			{
+				iData.AllItemsLocated();
+			}
+			finally
+			{
+				base.HandleReadCompleted();
+			}
+		}
+		#endregion
+
+		#region From MemAnalysisParserBase
+        protected override void HandleOpAllocation( MemOpAllocation aObject )
+        {
+			iData.Add( aObject, Options.DiscardMatchingAllocsAndFrees );
+		}
+
+        protected override void HandleOpFree( MemOpFree aObject )
+        {
+			iData.Add( aObject, Options.DiscardMatchingAllocsAndFrees );
+		}
+
+        protected override void HandleOpReallocation( MemOpReallocation aObject )
+        {
+			iData.Add( aObject );
+		}
+		#endregion
+
+		#region Data Members
+		private MemObjStatisticalData iData = new MemObjStatisticalData();
+		#endregion
+	}
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Options/MemAnalysisParserOptions.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.Parser.Prefixes;
+
+namespace MemAnalysisLib.Parser.Options
+{
+	public class MemAnalysisParserOptions
+	{
+		#region Constructors & destructor
+		public MemAnalysisParserOptions( MemAnalysisParserPrefixesBase aPrefixes )
+		{
+            iPrefixes = aPrefixes;
+		}
+		#endregion
+
+		#region Properties
+		public bool DiscardMatchingAllocsAndFrees
+		{
+			get { return iDiscardMatchingAllocsAndFrees; }
+			set { iDiscardMatchingAllocsAndFrees = value; }
+		}
+
+		public string TracePrefix
+		{
+			get { return iTracePrefix; }
+			set { iTracePrefix = value; }
+		}
+
+		public string SpecificThreadFilter
+		{
+			get { return iSpecificThreadFilter; }
+			set { iSpecificThreadFilter = value; }
+		}
+
+		public string SourceFileName
+		{
+			get { return iSourceFileName; }
+			set { iSourceFileName = value; }
+		}
+
+		public MemAnalysisParserPrefixesBase Prefixes
+		{
+			get { return iPrefixes; }
+			set { iPrefixes = value; }
+		}
+
+		public string MarkerTextStart
+		{
+			get { return iMarkerTextStart; }
+			set { iMarkerTextStart = value; }
+		}
+
+		public string MarkerTextEnd
+		{
+			get { return iMarkerTextEnd; }
+			set { iMarkerTextEnd = value; }
+		}
+
+		public bool MarkerTextToBeStripped
+		{
+			get { return iMarkerTextToBeStripped; }
+			set { iMarkerTextToBeStripped = value; }
+		}
+
+		public bool MarkerOperationsOutsideRegionToBeIgnored
+		{
+			get { return iMarkerOperationsOutsideRegionToBeIgnored; }
+			set { iMarkerOperationsOutsideRegionToBeIgnored = value; }
+		}
+		#endregion
+
+		#region Data members
+		private bool iDiscardMatchingAllocsAndFrees = true;
+		private bool iMarkerTextToBeStripped = true;
+		private bool iMarkerOperationsOutsideRegionToBeIgnored = true;
+		private string iTracePrefix = string.Empty;
+		private string iSpecificThreadFilter = string.Empty;
+		private string iSourceFileName = string.Empty;
+		private string iMarkerTextStart = string.Empty;
+		private string iMarkerTextEnd = string.Empty;
+		private MemAnalysisParserPrefixesBase iPrefixes = null;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Prefixes/Kernel/MemAnalysisParserPrefixesKernel.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Functions.Kernel;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+using SymbianUtils;
+
+namespace MemAnalysisLib.Parser.Prefixes.Kernel
+{
+    public class MemAnalysisParserPrefixesKernel : MemAnalysisParserPrefixesBase
+    {
+        #region Constructors & destructor
+        public MemAnalysisParserPrefixesKernel()
+		{
+            // From gcchelpers.cpp - Allocations
+            AssociatePrefixWithFunction( "ON      - ", new MemOpFnNew() );
+            AssociatePrefixWithFunction( "ON[]    - ", new MemOpFnNewArray() );
+            AssociatePrefixWithFunction( "ON+EX   - ", new MemOpFnNewExtraSize() );
+            AssociatePrefixWithFunction( "ON-NT   - ", new MemOpFnNewNoThrow() );
+            AssociatePrefixWithFunction( "ON-NT[] - ", new MemOpFnNewNoThrowArray() );
+
+            // From gcchelpers.cpp - Frees
+            AssociatePrefixWithFunction( "OD      - ", new MemOpFnDel() );
+            AssociatePrefixWithFunction( "OD[]    - ", new MemOpFnDelArray() );
+
+            // From DBase
+            AssociatePrefixWithFunction( "ODBN    - ", new MemOpFnNewDBase() );
+            AssociatePrefixWithFunction( "ODBN-EX - ", new MemOpFnNewDBaseExtraSize() );
+            AssociatePrefixWithFunction( "ODBD    - ", new MemOpFnDelDBase() );
+
+            // From TProperty
+            AssociatePrefixWithFunction( "OTPN    - ", new MemOpFnNewTProperty() );
+            AssociatePrefixWithFunction( "OTPD    - ", new MemOpFnDelTProperty() );
+
+            // From Kern::
+            AssociatePrefixWithFunction( "OKA     - ", new MemOpFnKernAlloc() );
+            AssociatePrefixWithFunction( "OKAZ    - ", new MemOpFnKernAllocZ() );
+            AssociatePrefixWithFunction( "OKF     - ", new MemOpFnKernFree() );
+            AssociatePrefixWithFunction( "OKR     - ", new MemOpFnKernReAlloc() );
+            AssociatePrefixWithFunction( "OKSR    - ", new MemOpFnKernSafeReAlloc() );
+
+            // These are re-defined
+            HeapSize                = "HS: ";
+            CellAddress             = "C: ";
+            LinkRegister            = "LR: ";
+            CellSize                = "CS: ";
+            AllocSize               = "AS: ";
+            AllocNumber             = "AN: ";
+            VTable                  = "VT: ";
+            ReallocMode             = "MD: ";
+            OriginalCellAddress     = "OC: ";
+            OriginalCellSize        = "OCS: ";
+            OriginalCellAllocNumber = "OCAN: ";
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Prefixes/MemAnalysisParserPrefixesBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,176 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.MemoryOperations.Functions;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+using SymbianUtils;
+
+namespace MemAnalysisLib.Parser.Prefixes
+{
+    public class MemAnalysisParserPrefixesBase
+	{
+		#region Constructors & destructor
+		protected MemAnalysisParserPrefixesBase()
+		{
+		}
+		#endregion
+
+        #region API
+        internal void AssociatePrefixWithFunction( string aPrefix, MemOpFnBase aFunction )
+        {
+            iFunctionPrefixes.Add( aPrefix, aFunction );
+        }
+
+        internal bool MatchesPrefix( ref string aLine, out MemOpFnBase aFunction )
+        {
+            bool foundMatch = false;
+            aFunction = null;
+            //
+            foreach ( KeyValuePair< string, MemOpFnBase> entry in iFunctionPrefixes )
+            {
+                int pos = aLine.IndexOf( entry.Key );
+                //
+                if ( pos >= 0 )
+                {
+                    SymbianUtils.PrefixParser.SkipPrefix( entry.Key, ref aLine );
+                    aFunction = entry.Value;
+                    foundMatch = true;
+                    break;
+                }
+            }
+            //
+            return foundMatch;
+        }
+        #endregion
+
+        #region Properties
+		public string HeapSize
+		{
+			get { return iHeapSize; }
+			set { iHeapSize = value; }
+		}
+
+        public string ChunkSize
+		{
+            get { return iChunkSize; }
+            set { iChunkSize = value; }
+		}
+
+		public string CellAddress
+		{
+			get { return iCellAddress; }
+			set { iCellAddress = value; }
+		}
+
+		public string LinkRegister
+		{
+			get { return iLinkRegister; }
+			set { iLinkRegister = value; }
+		}
+
+		public string AllocSize
+		{
+			get { return iAllocSize; }
+			set { iAllocSize = value; }
+		}
+
+        public string AllocNumber
+		{
+            get { return iAllocNumber; }
+            set { iAllocNumber = value; }
+		}
+
+		public string OriginalCellAddress
+		{
+			get { return iOriginalCellAddress; }
+			set { iOriginalCellAddress = value; }
+		}
+
+		public string OriginalCellSize
+		{
+            get { return iOriginalCellSize; }
+            set { iOriginalCellSize = value; }
+		}
+
+        public string OriginalCellAllocNumber
+		{
+            get { return iOriginalCellAllocNumber; }
+            set { iOriginalCellAllocNumber = value; }
+		}
+
+		public string ReallocMode
+		{
+			get { return iReallocMode; }
+			set { iReallocMode = value; }
+		}
+
+        public string VTable
+        {
+            get { return iVTable; }
+            set { iVTable = value; }
+        }
+
+        public string CellSize
+        {
+            get { return iCellSize; }
+            set { iCellSize = value; }
+        }
+        #endregion
+
+		#region Data members
+		private string iHeapSize = "heapSize: ";
+        private string iChunkSize = "HCS: ";
+		private string iCellAddress = "cell: ";
+		private string iLinkRegister = "linkR:";
+		private string iAllocSize = "allocSize:";
+		private string iOriginalCellAddress = "oCell:";
+		private string iOriginalCellSize = "oCSize:";
+        private string iOriginalCellAllocNumber = "oCAN:";
+        private string iReallocMode = "aMode:";
+		private string iAllocNumber = "allocNum:";
+        private string iVTable = "vTable:";
+        private string iCellSize = "cSize:";
+        private Dictionary<string, MemOpFnBase> iFunctionPrefixes = new Dictionary<string, MemOpFnBase>();
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/Engine/MemAnalysisLib/Parser/Prefixes/User/MemAnalysisParserPrefixesUser.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using MemAnalysisLib.Parser.Prefixes;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Functions.User;
+using SymbolLib.Generics;
+using SymbolLib.Engines;
+using SymbianUtils;
+
+namespace MemAnalysisLib.Parser.Prefixes.User
+{
+    public class MemAnalysisParserPrefixesUser : MemAnalysisParserPrefixesBase
+	{
+		#region Constructors & destructor
+        public MemAnalysisParserPrefixesUser()
+		{
+            // Allocations
+            AssociatePrefixWithFunction( "OUA     -", new MemOpFnUA() );
+            AssociatePrefixWithFunction( "OUAL    -", new MemOpFnUAL() );
+            AssociatePrefixWithFunction( "OUALC   -", new MemOpFnUALC() );
+            AssociatePrefixWithFunction( "OUAZ    -", new MemOpFnUAZ() );
+            AssociatePrefixWithFunction( "OUAZL   -", new MemOpFnUAZL() );
+
+            // Frees
+            AssociatePrefixWithFunction( "OUF     -", new MemOpFnUF() );
+            AssociatePrefixWithFunction( "OUFZ    -", new MemOpFnUFZ() );
+
+            // Reallocations
+            AssociatePrefixWithFunction( "OUR     -", new MemOpFnUR() );
+            AssociatePrefixWithFunction( "OURL    -", new MemOpFnURL() );
+
+            // These are re-defined
+            HeapSize = "HS: ";
+            CellAddress = "C: ";
+            LinkRegister = "LR: ";
+            CellSize = "CS: ";
+            AllocSize = "AS: ";
+            AllocNumber = "AN: ";
+            VTable = "VT: ";
+            ReallocMode = "MD: ";
+            OriginalCellAddress = "OC: ";
+            OriginalCellSize = "OCS: ";
+            OriginalCellAllocNumber = "OCAN: ";
+        }
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/HeapComparisonUiLib.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeapComparisonUiLib</RootNamespace>
+    <AssemblyName>HeapComparisonUiLib</AssemblyName>
+    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Progress\ComparisonProgressDialogData.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Progress\ComparisonProgressDialogCSV.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Progress\ComparisonProgressDialogData.resx">
+      <DependentUpon>ComparisonProgressDialogData.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Progress\ComparisonProgressDialogCSV.resx">
+      <DependentUpon>ComparisonProgressDialogCSV.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Engine\HeapComparisonLib\HeapComparisonLib.csproj">
+      <Project>{0911ECEE-D330-4DE9-989C-8181604FAAB5}</Project>
+      <Name>HeapComparisonLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Engine\HeapLib\HeapLib.csproj">
+      <Project>{D638AB12-FC64-4523-9B99-09F20BC2A791}</Project>
+      <Name>HeapLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogCSV.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,217 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using SymbianUtils;
+using HeapComparisonLib.CSV;
+
+namespace HeapComparisonUiLib.Progress
+{
+	public class ComparisonProgressDialogCSV : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer generated code
+        private IContainer components;
+        private Timer iTimer_OpStart;
+        private System.Windows.Forms.ProgressBar iProgressBar;
+		#endregion
+
+		#region Static constructor
+		public static void Compare( List<string> aSource, string aDestinationDir )
+		{
+            ComparisonProgressDialogCSV self = new ComparisonProgressDialogCSV( aSource, aDestinationDir );
+			self.ShowDialog();
+		}
+		#endregion
+
+        #region Constructors & destructor
+        private ComparisonProgressDialogCSV( List<string> aSource, string aDestinationDir )
+        {
+            iEngine = new CSVComparisonEngine( aSource, aDestinationDir );
+            iEngine.eExceptionHandler += new CSVComparisonEngine.ExceptionHandler( Engine_ExceptionHandler );
+            iEngine.eEventHandler += new CSVComparisonEngine.EventHandler( Engine_EventHandler );
+            iEngine.eIndexedProgressHandler += new CSVComparisonEngine.IndexedProgressHandler( Engine_IndexedProgressHandler );
+            iEngine.ePercentageProgressHandler += new CSVComparisonEngine.PercentageProgressHandler( Engine_PercentageProgressHandler );
+            //
+            InitializeComponent();
+            //
+            iTimer_OpStart.Start();
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing )
+            {
+                if ( components != null )
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+        #region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            this.iProgressBar = new System.Windows.Forms.ProgressBar();
+            this.iTimer_OpStart = new System.Windows.Forms.Timer( this.components );
+            this.SuspendLayout();
+            // 
+            // iProgressBar
+            // 
+            this.iProgressBar.Location = new System.Drawing.Point( 8, 8 );
+            this.iProgressBar.Name = "iProgressBar";
+            this.iProgressBar.Size = new System.Drawing.Size( 376, 24 );
+            this.iProgressBar.TabIndex = 0;
+            // 
+            // iTimer_OpStart
+            // 
+            this.iTimer_OpStart.Interval = 10;
+            this.iTimer_OpStart.Tick += new System.EventHandler( this.iTimer_OpStart_Tick );
+            // 
+            // ComparisonProgressDialogCSV
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.ClientSize = new System.Drawing.Size( 392, 39 );
+            this.ControlBox = false;
+            this.Controls.Add( this.iProgressBar );
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "ComparisonProgressDialogCSV";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Analysing...";
+            this.ResumeLayout( false );
+
+		}
+		#endregion
+
+        #region Event handlers
+        private void iTimer_OpStart_Tick( object sender, EventArgs e )
+        {
+            iTimer_OpStart.Stop();
+            iTimer_OpStart.Enabled = false;
+            //
+            iEngine.CompareAsync();
+        }
+        #endregion
+
+        #region Engine observer
+        void Engine_PercentageProgressHandler( CSVComparisonEngine.TEvent aEvent, CSVComparisonEngine aSender, int aProgressPercent )
+        {
+            if ( InvokeRequired )
+            {
+                CSVComparisonEngine.PercentageProgressHandler observer = new CSVComparisonEngine.PercentageProgressHandler( Engine_PercentageProgressHandler );
+                this.BeginInvoke( observer, new object[] { aEvent, aSender, aProgressPercent } );
+            }
+            else
+            {
+                iProgressBar.Value = aProgressPercent;
+            }
+        }
+
+        void Engine_IndexedProgressHandler( CSVComparisonEngine.TEvent aEvent, CSVComparisonEngine aSender, int aCurrentIndex, int aMaxIndex )
+        {
+            if ( InvokeRequired )
+            {
+                CSVComparisonEngine.IndexedProgressHandler observer = new CSVComparisonEngine.IndexedProgressHandler( Engine_IndexedProgressHandler );
+                this.BeginInvoke( observer, new object[] { aEvent, aSender, aCurrentIndex, aMaxIndex } );
+            }
+            else
+            {
+                if ( aEvent == CSVComparisonEngine.TEvent.EEventComparingMovedToNewDataSet )
+                {
+                    Text = string.Format( "Performing comparsion {0}/{1}", aCurrentIndex, aMaxIndex );
+                }
+                else if ( aEvent == CSVComparisonEngine.TEvent.EEventSplittingMovedToNewFile )
+                {
+                    Text = string.Format( "Extracting data set(s) from file {0}/{1}", aCurrentIndex, aMaxIndex ); 
+                }
+
+                // Reset progress
+                iProgressBar.Maximum = 100; //%
+                iProgressBar.Minimum = 0; //%
+                iProgressBar.Value = 0;
+            }
+        }
+
+        void Engine_EventHandler( CSVComparisonEngine.TEvent aEvent, CSVComparisonEngine aSender )
+        {
+            if ( InvokeRequired )
+            {
+                CSVComparisonEngine.EventHandler observer = new CSVComparisonEngine.EventHandler( Engine_EventHandler );
+                this.BeginInvoke( observer, new object[] { aEvent, aSender } );
+            }
+            else
+            {
+                if ( aEvent == CSVComparisonEngine.TEvent.EEventOperationStarted )
+                {
+                }
+                else if ( aEvent == CSVComparisonEngine.TEvent.EEventOperationComplete )
+                {
+                    iProgressBar.Value = 100;
+                    Close();
+                }
+            }
+        }
+
+        void Engine_ExceptionHandler( string aTitle, string aBody )
+        {
+            if ( InvokeRequired )
+            {
+                CSVComparisonEngine.ExceptionHandler observer = new CSVComparisonEngine.ExceptionHandler( Engine_ExceptionHandler );
+                this.BeginInvoke( observer, new object[] { aTitle, aBody } );
+            }
+            else
+            {
+                MessageBox.Show( aBody, aBody, MessageBoxButtons.OK );
+                Close();
+            }
+        }
+        #endregion
+
+		#region Data members
+        private readonly CSVComparisonEngine iEngine;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogCSV.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer_OpStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,264 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Reconstructor;
+using HeapComparisonLib.Data;
+
+namespace HeapComparisonUiLib.Progress
+{
+    public class ComparisonProgressDialogData : System.Windows.Forms.Form
+    {
+        #region Windows Form Designer generated code
+        private IContainer components;
+        private ProgressBar iProgBar;
+        private Timer iTimer_OpStart;
+        #endregion
+
+        #region Static API
+        public static void Compare( HeapReconstructor aReconstructor1, HeapReconstructor aReconstructor2, string aFileName )
+        {
+            ComparisonProgressDialogData self = new ComparisonProgressDialogData( aReconstructor1, aReconstructor2, aFileName );
+            self.ShowDialog();
+        }
+        #endregion
+
+        #region Constructors & destructor
+        private ComparisonProgressDialogData( HeapReconstructor aReconstructor1, HeapReconstructor aReconstructor2, string aFileName )
+        {
+            iReconstructor1 = aReconstructor1;
+            iReconstructor2 = aReconstructor2;
+            //
+            InitializeComponent();
+            //
+            iReconstructor1.iObserver += new HeapReconstructor.Observer( HeapReconstructorObserver );
+            iReconstructor2.iObserver += new HeapReconstructor.Observer( HeapReconstructorObserver );
+            //
+            iComparisonEngine = new ComparsionEngine( iReconstructor1, iReconstructor2 );
+            iComparisonEngine.iObserver += new AsyncReaderBase.Observer( ComparisonEngineObserver );
+            //
+            iComparisonWriter = new ComparisonWriter( iComparisonEngine, aFileName );
+            iComparisonWriter.iObserver += new AsyncTextWriterBase.Observer( ComparsionWriterObserver );
+            //
+            iTimer_OpStart.Start();
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing )
+            {
+                if ( components != null )
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+        #region Windows Form Designer generated code
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.iTimer_OpStart = new System.Windows.Forms.Timer( this.components );
+            this.iProgBar = new System.Windows.Forms.ProgressBar();
+            this.SuspendLayout();
+            // 
+            // iTimer_OpStart
+            // 
+            this.iTimer_OpStart.Interval = 10;
+            this.iTimer_OpStart.Tick += new System.EventHandler( this.iTimer_OpStart_Tick );
+            // 
+            // iProgBar
+            // 
+            this.iProgBar.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iProgBar.Location = new System.Drawing.Point( 3, 3 );
+            this.iProgBar.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iProgBar.Name = "iProgBar";
+            this.iProgBar.Size = new System.Drawing.Size( 351, 26 );
+            this.iProgBar.TabIndex = 2;
+            // 
+            // ComparisonProgressDialogData
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.ClientSize = new System.Drawing.Size( 357, 32 );
+            this.ControlBox = false;
+            this.Controls.Add( this.iProgBar );
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "ComparisonProgressDialogData";
+            this.Padding = new System.Windows.Forms.Padding( 3 );
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Analysing...";
+            this.ResumeLayout( false );
+
+        }
+        #endregion
+
+        #region Event handlers
+        private void iTimer_OpStart_Tick( object sender, EventArgs e )
+        {
+            iTimer_OpStart.Stop();
+            iTimer_OpStart.Enabled = false;
+
+            // Start process by analysing the first heap
+            iReconstructor1.Reconstruct();
+        }
+        #endregion
+
+        #region Heap reconstructor callback
+        private void HeapReconstructorObserver( HeapReconstructor.TEvent aEvent, HeapReconstructor aReconstructor )
+        {
+            if ( InvokeRequired )
+            {
+                HeapReconstructor.Observer observer = new HeapReconstructor.Observer( HeapReconstructorObserver );
+                this.BeginInvoke( observer, new object[] { aEvent, aReconstructor } );
+            }
+            else
+            {
+                // Select correct progress bar...
+                string title = "Reading Heap 1...";
+                if ( aReconstructor == iReconstructor2 )
+                {
+                    title = "Reading Heap 2...";
+                }
+                //
+                switch ( aEvent )
+                {
+                case HeapReconstructor.TEvent.EReconstructingStarted:
+                    this.Text = title;
+                    iProgBar.Maximum = 100; //%
+                    iProgBar.Minimum = 0; //%
+                    iProgBar.Value = 0;
+                    break;
+                case HeapReconstructor.TEvent.EReconstructingProgress:
+                    iProgBar.Value = aReconstructor.Progress;
+                    break;
+                case HeapReconstructor.TEvent.EReconstructingComplete:
+                    iProgBar.Value = 100;
+
+                    if ( aReconstructor == iReconstructor1 )
+                    {
+                        // Finished first heap, now move on to second
+                        iReconstructor2.Reconstruct();
+                    }
+                    else
+                    {
+                        // Start output engine
+                        iComparisonEngine.Compare();
+                    }
+                    break;
+                }
+            }
+        }
+        #endregion
+
+        #region Comparsion engine observer
+        private void ComparisonEngineObserver( AsyncReaderBase.TEvent aEvent, AsyncReaderBase aSender )
+        {
+            if ( InvokeRequired )
+            {
+                SymbianUtils.AsyncReaderBase.Observer observer = new SymbianUtils.AsyncReaderBase.Observer( ComparisonEngineObserver );
+                this.BeginInvoke( observer, new object[] { aEvent, aSender } );
+            }
+            else
+            {
+                switch ( aEvent )
+                {
+                case SymbianUtils.AsyncReaderBase.TEvent.EReadingStarted:
+                    this.Text = "Comparing Heaps...";
+                    iProgBar.Maximum = 100; //%
+                    iProgBar.Minimum = 0; //%
+                    iProgBar.Value = 0;
+                    break;
+                case SymbianUtils.AsyncReaderBase.TEvent.EReadingProgress:
+                    iProgBar.Value = aSender.Progress;
+                    break;
+                case SymbianUtils.AsyncReaderBase.TEvent.EReadingComplete:
+                    iProgBar.Value = 100;
+                    iComparisonWriter.SaveAsExcel();
+                    break;
+                }
+            }
+        }
+        #endregion
+
+        #region Comparsion writer observer
+        private void ComparsionWriterObserver( AsyncTextWriterBase.TEvent aEvent, AsyncTextWriterBase aObject )
+        {
+            if ( InvokeRequired )
+            {
+                SymbianUtils.AsyncTextWriterBase.Observer observer = new SymbianUtils.AsyncTextWriterBase.Observer( ComparsionWriterObserver );
+                this.BeginInvoke( observer, new object[] { aEvent, aObject } );
+            }
+            else
+            {
+                switch ( aEvent )
+                {
+                case SymbianUtils.AsyncTextWriterBase.TEvent.EWritingStarted:
+                    this.Text = "Creating Excel File...";
+                    iProgBar.Maximum = 100; //%
+                    iProgBar.Minimum = 0; //%
+                    iProgBar.Value = 0;
+                    break;
+                case SymbianUtils.AsyncTextWriterBase.TEvent.EWritingProgress:
+                    iProgBar.Value = aObject.Progress;
+                    break;
+                case SymbianUtils.AsyncTextWriterBase.TEvent.EWritingComplete:
+                    iProgBar.Value = 100;
+                    Close();
+                    break;
+                }
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapReconstructor iReconstructor1;
+        private readonly HeapReconstructor iReconstructor2;
+        private readonly ComparsionEngine iComparisonEngine;
+        private readonly ComparisonWriter iComparisonWriter;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Progress/ComparisonProgressDialogData.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer_OpStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapComparisonUiLib/Properties/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle( "HeapComparisonUiLib" )]
+[assembly: AssemblyDescription( "" )]
+[assembly: AssemblyConfiguration( "" )]
+[assembly: AssemblyCompany( "Nokia" )]
+[assembly: AssemblyProduct( "HeapComparisonUiLib" )]
+[assembly: AssemblyCopyright( "Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved." )]
+[assembly: AssemblyTrademark( "" )]
+[assembly: AssemblyCulture( "" )]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible( false )]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid( "b372aea6-69da-4905-af0f-73d2cffec08b" )]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.1.0.*")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("HeapCtrlLib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Nokia")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]		
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapDataControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,347 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Windows.Forms;
+using HeapLib.Cells;
+using HeapLib.Reconstructor;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Types;
+using HeapLib;
+using HeapLib.Array;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib
+{
+    public class HeapDataControl : System.Windows.Forms.UserControl
+    {
+        #region Delegates & events
+        public delegate void OnCellSelected( HeapCell aCell );
+        public event OnCellSelected CellSelected;
+        public delegate void OnCellDoubleClicked( HeapCell aCell );
+        public event OnCellDoubleClicked CellDoubleClicked;
+        public delegate void CellRightClickedHandler( HeapCell aCell, RawItem aRawItem, Point aScreenPos );
+        public event CellRightClickedHandler CellRightClicked;
+        #endregion
+
+        #region Windows Form Designer code
+        private System.ComponentModel.Container components = null;
+        private HeapCtrlLib.Renderers.HeapDataRenderer iRenderer = null;
+        private SymbianUtilsUi.Controls.ScrollBarWithoutKeyConsumption iSB_Vertical = null;
+        #endregion
+
+        #region Constructors & destructor
+        public HeapDataControl()
+        {
+            InitializeComponent();
+            //
+            //			this.SetStyle(ControlStyles.DoubleBuffer, true);
+            //			this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
+            //			this.SetStyle(ControlStyles.UserPaint, true);
+            this.SetStyle(ControlStyles.ResizeRedraw, true);
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if( disposing )
+            {
+                if(components != null)
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+        #region Component Designer generated code
+        private void InitializeComponent()
+        {
+            this.iRenderer = new HeapDataRenderer();
+            this.iSB_Vertical = new SymbianUtilsUi.Controls.ScrollBarWithoutKeyConsumption();
+            this.SuspendLayout();
+            // 
+            // iSB_Vertical
+            // 
+            this.iSB_Vertical.Dock = System.Windows.Forms.DockStyle.Right;
+            this.iSB_Vertical.Location = new System.Drawing.Point( 598, 2 );
+            this.iSB_Vertical.Name = "iSB_Vertical";
+            this.iSB_Vertical.Size = new System.Drawing.Size( 16, 156 );
+            this.iSB_Vertical.TabIndex = 2;
+            this.iSB_Vertical.Scroll += new System.Windows.Forms.ScrollEventHandler( this.iSB_Vertical_Scroll );
+            // 
+            // iRenderer
+            // 
+            this.iRenderer.Address = ( (uint) ( 0u ) );
+            this.iRenderer.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iRenderer.FocusedCell = null;
+            this.iRenderer.Location = new System.Drawing.Point( 3, 3 );
+            this.iRenderer.Name = "iRenderer";
+            this.iRenderer.Reconstructor = null;
+            this.iRenderer.Size = new System.Drawing.Size( 596, 154 );
+            this.iRenderer.TabIndex = 1;
+            this.iRenderer.Zoom = HeapCtrlLib.Types.THeapCtrlZoom.EHeapCtrlZoomMedium;
+            this.iRenderer.Enter += new System.EventHandler( this.iRenderer_Enter );
+            this.iRenderer.AddressChanged += new HeapCtrlLib.Renderers.HeapDataRenderer.AddressChangeHandler( this.iRenderer_AddressChanged );
+            this.iRenderer.Leave += new System.EventHandler( this.iRenderer_Leave );
+            this.iRenderer.CellSelected += new HeapCtrlLib.Renderers.HeapDataRenderer.CellSelectionHandler( this.iRenderer_CellSelected );
+            this.iRenderer.CellRightClicked += new HeapDataRenderer.CellRightClickedHandler( iRenderer_CellRightClicked );
+            this.iRenderer.CellDoubleClicked += new HeapDataRenderer.CellDoubleClickHandler( iRenderer_CellDoubleClicked );
+            // 
+            // HeapDataControl
+            // 
+            this.Controls.Add( this.iSB_Vertical );
+            this.Controls.Add( this.iRenderer );
+            this.Name = "HeapDataControl";
+            this.Padding = new System.Windows.Forms.Padding( 2 );
+            this.Size = new System.Drawing.Size( 616, 160 );
+            this.SizeChanged += new System.EventHandler( this.HeapDataControl_SizeChanged );
+            this.ResumeLayout( false );
+        }
+        #endregion
+
+        #region API
+        public void SetupFilters()
+        {
+            iRenderer.SetupFilters();
+        }
+
+        public void BreadcrumbsChanged()
+        {
+            iRenderer.Invalidate();
+        }
+        #endregion
+
+        #region Properties
+        public THeapCtrlZoom Zoom
+        {
+            get { return iRenderer.Zoom; }
+            set
+            {
+                iRenderer.Zoom = value;
+
+                // Force repositioning to top of view.
+                Reconstructor = Reconstructor;
+            }
+        }
+
+        public THeapCtrlRenderingType Type
+        {
+            get { return iType; }
+            set
+            {
+                if  ( iType != value )
+                {
+                    iType = value;
+                    iRenderer.LoadTypeSet( iType );
+                    iRenderer.Invalidate();
+                }
+            }
+        }
+
+        [Browsable(false)]
+        internal Size CellBoxSize
+        {
+            get { return iRenderer.CellBoxSize; }
+            set { iRenderer.CellBoxSize = value; }
+        }
+
+        [Browsable(false)]
+        internal Size CellPadding
+        {
+            get { return iRenderer.CellPadding; }
+            set { iRenderer.CellPadding = value; }
+        }
+
+        [Browsable(false)]
+        public HeapReconstructor Reconstructor
+        {
+            get
+            {
+                return iReconstructor;
+            }
+            set
+            {
+                iReconstructor = value;
+                iRenderer.Reconstructor = value;
+                SetupScrollBar();
+                //
+                Invalidate();
+            }
+        }
+
+        [Browsable(false)]
+        public HeapCell FocusedCell
+        {
+            get { return iRenderer.FocusedCell; }
+            set { iRenderer.FocusedCell = value; }
+        }
+
+        [Browsable(false)]
+        public bool SupportsFiltering
+        {
+            get { return iRenderer.SupportsFiltering; }
+        }
+
+        [Browsable( false )]
+        public HeapCellArrayBase BreadcrumbCellsOutgoing
+        {
+            get { return iRenderer.BreadcrumbCellsOutgoing; }
+        }
+
+        [Browsable( false )]
+        public HeapCellArrayBase BreadcrumbCellsIncoming
+        {
+            get { return iRenderer.BreadcrumbCellsIncoming; }
+        }
+        #endregion
+
+        #region Drawing
+        protected override void OnPaint( PaintEventArgs aArgs )
+        {
+            aArgs.Graphics.Clear( Color.LightGray );					
+            //
+            float borderWidth = ( iRenderer.Focused ? 2.0f : 1.0f );
+            Color borderColor  = ( iRenderer.Focused ? Color.Black : Color.Gray );
+
+            using( Pen borderPen = new Pen( borderColor, borderWidth ) )
+            {
+                aArgs.Graphics.DrawRectangle( borderPen, 0, 0, ClientSize.Width-1, ClientSize.Height-1 );
+            }
+            //
+            base.OnPaint( aArgs );
+        }
+        #endregion
+
+        #region Event handlers
+        private void HeapDataControl_SizeChanged(object sender, System.EventArgs e)
+        {
+            SetupScrollBar();
+        }
+
+        private void iSB_Vertical_Scroll(object sender, System.Windows.Forms.ScrollEventArgs e)
+        {
+            int rowIndex = e.NewValue;
+            int bytesPerRow = iRenderer.RowsAndColumns.Width * 4;
+            uint baseAddressOffset = (uint) ( bytesPerRow * rowIndex );
+            uint address = iReconstructor.Statistics.HeapAddressStart + baseAddressOffset;
+            //
+            iRenderer.Address = address ;
+        }
+ 
+        private void iRenderer_AddressChanged( uint aAddressOld, uint aAddressNew, HeapLib.Cells.HeapCell aFirstCell, int aFirstCellIndex )
+        {
+            SetupScrollBar();
+        }
+
+        private void iRenderer_Enter(object sender, System.EventArgs e)
+        {
+            Invalidate();
+        }
+
+        private void iRenderer_Leave(object sender, System.EventArgs e)
+        {
+            Invalidate();
+        }
+
+        private void iRenderer_CellSelected(HeapLib.Cells.HeapCell aCell)
+        {
+            if  ( CellSelected != null )
+            {
+                CellSelected( aCell );
+            }
+        }
+
+        private void iRenderer_CellDoubleClicked( HeapCell aCell )
+        {
+            if ( CellDoubleClicked != null )
+            {
+                CellDoubleClicked( aCell );
+            }
+        }
+
+        private void iRenderer_CellRightClicked( HeapCell aCell, RawItem aRawItem, Point aViewerPos )
+        {
+            if ( CellRightClicked != null )
+            {
+                Point screenPos = iRenderer.PointToScreen( aViewerPos );
+                CellRightClicked( aCell, aRawItem, screenPos );
+            }
+        }
+
+        /*protected override void WndProc(ref Message m)
+        {
+            SymbianUtilsUi.Utilities.WindowMessages.PrintMessage( "CTRL ", m.Msg );
+            base.WndProc (ref m);
+        }*/
+        #endregion
+
+        #region Internal methods
+        private void SetupScrollBar()
+        {                
+            Size rendererDimensions = iRenderer.RowsAndColumns;
+            //
+            if  ( iReconstructor != null && rendererDimensions.Width > 0 && rendererDimensions.Height > 0 )
+            {
+                uint extent = ( iReconstructor.Statistics.HeapAddressEnd - iReconstructor.Statistics.HeapAddressStart );
+                uint bytesPerRow = (uint) ( iRenderer.RowsAndColumns.Width * 4 );
+                uint numberOfRows = extent / bytesPerRow;
+                uint rowNumber = ( iRenderer.Address - iReconstructor.Statistics.HeapAddressStart ) / bytesPerRow;
+                if ( rowNumber > numberOfRows )
+                {
+                    rowNumber = numberOfRows;
+                }
+                //
+                iSB_Vertical.Minimum = 0;
+                iSB_Vertical.Maximum = (int) Math.Max( 0, numberOfRows );
+                iSB_Vertical.Value = (int) rowNumber;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private HeapReconstructor iReconstructor;
+        private THeapCtrlRenderingType iType = THeapCtrlRenderingType.EHeapCtrlRenderingTypeByCell;
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapDataControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapFilteringControl.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapCtrlLib.Controls
+{
+    partial class HeapFilteringControl
+    {
+        // <summary> 
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary> 
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Component Designer generated code
+
+        // <summary> 
+        // Required method for Designer support - do not modify 
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            this.iTableModel = new XPTable.Models.TableModel();
+            this.iTable = new XPTable.Models.Table();
+            this.iColumnModel = new XPTable.Models.ColumnModel();
+            this.iCol_Enabled = new XPTable.Models.CheckBoxColumn();
+            this.iCol_Colour = new XPTable.Models.ColorColumn();
+            this.iCol_Entity = new XPTable.Models.TextColumn();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).BeginInit();
+            this.SuspendLayout();
+            // 
+            // iTable
+            // 
+            this.iTable.ColumnModel = this.iColumnModel;
+            this.iTable.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTable.GridLines = XPTable.Models.GridLines.Both;
+            this.iTable.Location = new System.Drawing.Point( 0, 0 );
+            this.iTable.Name = "iTable";
+            this.iTable.Size = new System.Drawing.Size( 625, 300 );
+            this.iTable.TabIndex = 0;
+            this.iTable.TableModel = this.iTableModel;
+            this.iTable.CellCheckChanged += new XPTable.Events.CellCheckBoxEventHandler( this.iTable_CellCheckChanged );
+            // 
+            // iColumnModel
+            // 
+            this.iColumnModel.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iCol_Enabled,
+            this.iCol_Colour,
+            this.iCol_Entity} );
+            // 
+            // iCol_Enabled
+            // 
+            this.iCol_Enabled.Text = "Enabled";
+            this.iCol_Enabled.Width = 60;
+            // 
+            // iCol_Colour
+            // 
+            this.iCol_Colour.Text = "Colour";
+            this.iCol_Colour.Width = 140;
+            // 
+            // iCol_Entity
+            // 
+            this.iCol_Entity.Text = "Entity";
+            this.iCol_Entity.Width = 350;
+            // 
+            // HeapFilteringControl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add( this.iTable );
+            this.Name = "HeapFilteringControl";
+            this.Size = new System.Drawing.Size( 625, 300 );
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).EndInit();
+            this.ResumeLayout( false );
+
+        }
+
+        #endregion
+
+        private XPTable.Models.TableModel iTableModel;
+        private XPTable.Models.Table iTable;
+        private XPTable.Models.ColumnModel iColumnModel;
+        private XPTable.Models.CheckBoxColumn iCol_Enabled;
+        private XPTable.Models.ColorColumn iCol_Colour;
+        private XPTable.Models.TextColumn iCol_Entity;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapFilteringControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,177 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using HeapCtrlLib.Utilities;
+using HeapLib.Statistics.Tracking.Base;
+
+namespace HeapCtrlLib.Controls
+{
+    internal partial class HeapFilteringControl : UserControl
+    {
+        #region Constructors & destructor
+        public HeapFilteringControl()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region Properties
+        internal HeapCellFilterTripletDictionary Dictionary
+        {
+            get
+            {
+                HeapCellFilterTripletDictionary ret = new HeapCellFilterTripletDictionary();
+                //
+                foreach ( XPTable.Models.Row row in iTableModel.Rows )
+                {
+                    TripletDictionaryEntry entry = (TripletDictionaryEntry) row.Tag;
+                    //
+                    //XPTable.Models.Cell cellEnabled = row.Cells[ 0 ];
+                    XPTable.Models.Cell cellColor = row.Cells[ 1 ];
+                    //
+                    ret.Add( entry.iKey, entry.iTriplet.Entity, (Color) cellColor.Data, entry.iTriplet.TrackingInfo );
+                }
+
+                return ret;
+            }
+            set
+            {
+                iDictionary = value;
+                UpdateFilters();
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iTable_CellCheckChanged( object sender, XPTable.Events.CellCheckBoxEventArgs e )
+        {
+            XPTable.Models.Row row = iTableModel.Rows[ e.Row ];
+            XPTable.Models.Cell cellEnabled = e.Cell;
+            XPTable.Models.Cell cellColor = row.Cells[ 1 ];
+            TripletDictionaryEntry entry = (TripletDictionaryEntry) row.Tag;
+            //
+            if ( e.Column == 0 ) // iCol_Enabled
+            {
+                entry.iTriplet.Enabled = ( cellEnabled.Checked );
+                //
+                if ( cellEnabled.Checked )
+                {
+                    row.ForeColor = iTable.ForeColor;
+                    cellColor.Data = entry.iTriplet.Color;
+                }
+                else
+                {
+                    row.ForeColor = Color.DarkGray;
+                    cellColor.Data = HeapCellFilterTriplet.KDisabledColour;
+                }
+            }
+            else if ( e.Column == 1 ) // iCol_Colour
+            {
+                if ( cellEnabled.Checked )
+                {
+                    entry.iTriplet.Color = (Color) cellColor.Data;
+                }
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateFilters()
+        {
+            iTable.BeginUpdate();
+            iTable.TableModel.Rows.Clear();
+            //
+            foreach ( KeyValuePair<string, HeapCellFilterTriplet> entry in iDictionary )
+            {
+                XPTable.Models.Row row = new XPTable.Models.Row();
+                row.Tag = new TripletDictionaryEntry( entry.Key, entry.Value );
+                //
+                XPTable.Models.Cell cellEnabled = new XPTable.Models.Cell( string.Empty, entry.Value.Enabled );
+                XPTable.Models.Cell cellColour = new XPTable.Models.Cell( string.Empty, entry.Value.Color );
+                XPTable.Models.Cell cellText = new XPTable.Models.Cell( entry.Value.Entity );
+                //
+                row.Cells.Add( cellEnabled );
+                row.Cells.Add( cellColour );
+                row.Cells.Add( cellText );
+                //
+                if ( cellEnabled.Checked )
+                {
+                    row.ForeColor = iTable.ForeColor;
+                    cellColour.Data = entry.Value.Color;
+                }
+                else
+                {
+                    row.ForeColor = Color.DarkGray;
+                    cellColour.Data = HeapCellFilterTriplet.KDisabledColour;
+                }
+                //
+                if ( !entry.Value.TrackingInfo.IsUnknownSymbolMatchItem )
+                {
+                    iTableModel.Rows.Add( row );
+                }
+            }
+            //
+            iTable.EndUpdate();
+        }
+        #endregion
+
+        #region Data members
+        private HeapCellFilterTripletDictionary iDictionary = new HeapCellFilterTripletDictionary();
+        #endregion
+    }
+
+    #region Internal class
+    internal class TripletDictionaryEntry
+    {
+        public TripletDictionaryEntry( string aKey, HeapCellFilterTriplet aTriplet )
+        {
+            iKey = aKey;
+            iTriplet = aTriplet;
+        }
+
+        public readonly string iKey;
+        public readonly HeapCellFilterTriplet iTriplet;
+    }
+    #endregion
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Controls/HeapFilteringControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTableModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>140, 17</value>
+  </metadata>
+  <metadata name="iColumnModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>251, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Dialogs/HeapRendererFilterConfigDialog.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,143 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapCtrlLib.Dialogs
+{
+    partial class HeapRendererFilterConfigDialog
+    {
+        // <summary>
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary>
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Windows Form Designer generated code
+
+        // <summary>
+        // Required method for Designer support - do not modify
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            this.iFilterControl = new HeapCtrlLib.Controls.HeapFilteringControl();
+            this.iBT_Done = new System.Windows.Forms.Button();
+            this.iBT_EnableAll = new System.Windows.Forms.Button();
+            this.iBT_EnableNone = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // iFilterControl
+            // 
+            this.iFilterControl.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iFilterControl.Location = new System.Drawing.Point( 12, 12 );
+            this.iFilterControl.Name = "iFilterControl";
+            this.iFilterControl.Size = new System.Drawing.Size( 577, 226 );
+            this.iFilterControl.TabIndex = 0;
+            // 
+            // iBT_Done
+            // 
+            this.iBT_Done.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iBT_Done.Location = new System.Drawing.Point( 601, 215 );
+            this.iBT_Done.Name = "iBT_Done";
+            this.iBT_Done.Size = new System.Drawing.Size( 81, 23 );
+            this.iBT_Done.TabIndex = 1;
+            this.iBT_Done.Text = "Done";
+            this.iBT_Done.UseVisualStyleBackColor = true;
+            this.iBT_Done.Click += new System.EventHandler( this.iBT_Done_Click );
+            // 
+            // iBT_EnableAll
+            // 
+            this.iBT_EnableAll.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iBT_EnableAll.Location = new System.Drawing.Point( 601, 12 );
+            this.iBT_EnableAll.Name = "iBT_EnableAll";
+            this.iBT_EnableAll.Size = new System.Drawing.Size( 81, 23 );
+            this.iBT_EnableAll.TabIndex = 1;
+            this.iBT_EnableAll.Text = "Enable All";
+            this.iBT_EnableAll.UseVisualStyleBackColor = true;
+            this.iBT_EnableAll.Click += new System.EventHandler( this.iBT_EnableAll_Click );
+            // 
+            // iBT_EnableNone
+            // 
+            this.iBT_EnableNone.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iBT_EnableNone.Location = new System.Drawing.Point( 601, 41 );
+            this.iBT_EnableNone.Name = "iBT_EnableNone";
+            this.iBT_EnableNone.Size = new System.Drawing.Size( 81, 23 );
+            this.iBT_EnableNone.TabIndex = 1;
+            this.iBT_EnableNone.Text = "Enable None";
+            this.iBT_EnableNone.UseVisualStyleBackColor = true;
+            this.iBT_EnableNone.Click += new System.EventHandler( this.iBT_EnableNone_Click );
+            // 
+            // HeapRendererFilterConfigDialog
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size( 689, 249 );
+            this.ControlBox = false;
+            this.Controls.Add( this.iBT_EnableNone );
+            this.Controls.Add( this.iBT_EnableAll );
+            this.Controls.Add( this.iBT_Done );
+            this.Controls.Add( this.iFilterControl );
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "HeapRendererFilterConfigDialog";
+            this.Text = "Configure Filters...";
+            this.Load += new System.EventHandler( this.HeapRendererFilterConfigDialog_Load );
+            this.ResumeLayout( false );
+
+        }
+
+        #endregion
+
+        private HeapCtrlLib.Controls.HeapFilteringControl iFilterControl;
+        private System.Windows.Forms.Button iBT_Done;
+        private System.Windows.Forms.Button iBT_EnableAll;
+        private System.Windows.Forms.Button iBT_EnableNone;
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Dialogs/HeapRendererFilterConfigDialog.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using HeapCtrlLib.Utilities;
+
+namespace HeapCtrlLib.Dialogs
+{
+    internal partial class HeapRendererFilterConfigDialog : Form
+    {
+        #region Constructors & destructor
+        public HeapRendererFilterConfigDialog( HeapCellFilterTripletDictionary aDictionary )
+        {
+            InitializeComponent();
+            //
+            iFilterControl.Dictionary = aDictionary;
+        }
+        #endregion
+
+        #region Properties
+        internal HeapCellFilterTripletDictionary Dictionary
+        {
+            get { return iFilterControl.Dictionary; }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iBT_Done_Click( object sender, EventArgs e )
+        {
+            DialogResult = DialogResult.OK;
+            Close();
+        }
+
+        private void iBT_EnableAll_Click( object sender, EventArgs e )
+        {
+            HeapCellFilterTripletDictionary dictionary = Dictionary;
+            //
+            foreach ( KeyValuePair<string, HeapCellFilterTriplet> entry in dictionary )
+            {
+                entry.Value.Enabled = true;
+            }
+
+            // Update control
+            iFilterControl.Dictionary = dictionary;
+        }
+
+        private void iBT_EnableNone_Click( object sender, EventArgs e )
+        {
+            HeapCellFilterTripletDictionary dictionary = Dictionary;
+            //
+            foreach ( KeyValuePair<string, HeapCellFilterTriplet> entry in dictionary )
+            {
+                entry.Value.Enabled = false;
+            }
+
+            // Update control
+            iFilterControl.Dictionary = dictionary;
+        }
+
+        private void HeapRendererFilterConfigDialog_Load( object sender, EventArgs e )
+        {
+
+        }
+        #endregion
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Dialogs/HeapRendererFilterConfigDialog.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/Factory.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Types;
+
+namespace HeapCtrlLib.Factories
+{
+	internal abstract class Factory
+	{
+        #region Constructors & destructor
+		public static Factory CreateByType( THeapCtrlRenderingType aType )
+		{
+            Factory ret = null;
+            //
+            switch( aType )
+            {
+                case THeapCtrlRenderingType.EHeapCtrlRenderingTypeByCell:
+                    ret = new FactoryByCellType();
+                    break;
+                case THeapCtrlRenderingType.EHeapCellRenderingTypeBySymbol:
+                    ret = new FactoryBySymbol();
+                    break;
+                case THeapCtrlRenderingType.EHeapCellRenderingTypeByObject:
+                    ret = new FactoryByObject();
+                    break;
+                case THeapCtrlRenderingType.EHeapCellRenderingTypeByAge:
+                    ret = new FactoryByAge();
+                    break;
+                case THeapCtrlRenderingType.EHeapCellRenderingTypeByLength:
+                    ret = new FactoryByLength();
+                    break;
+                case THeapCtrlRenderingType.EHeapCellRenderingTypeByIsolation:
+                    ret = new FactoryByIsolation();
+                    break;
+                case THeapCtrlRenderingType.EHeapCellRenderingTypeByEmbeddedReferences:
+                    ret = new FactoryByEmbeddedReferences();
+                    break;
+            }
+            //
+            if  ( ret == null )
+            {
+                throw new NotSupportedException();
+            }
+            else if ( ret.Renderers.CheckIfAnyItemsInvalid() )
+            {
+                throw new Exception( "One or more renderers were not initialized" );
+            }
+            //
+            return ret;
+		}
+        #endregion
+
+        #region API
+        public virtual Size CellBoxSize( THeapCtrlZoom aZoom )
+        {
+            Size ret = new Size( 0, 0 );
+            //
+            switch ( aZoom )
+            {
+            case THeapCtrlZoom.EHeapCtrlZoomSmall:
+                ret = new Size( 13, 13 );
+                break;
+            default:
+            case THeapCtrlZoom.EHeapCtrlZoomMedium:
+                ret = new Size( 25, 25 );
+                break;
+            case THeapCtrlZoom.EHeapCtrlZoomMaximum:
+                ret = new Size( 39, 39 );
+                break;
+            }
+            //
+            return ret;
+        }
+
+        public virtual Size CellPadding( THeapCtrlZoom aZoom )
+        {
+            Size ret = new Size( 0, 0 );
+            //
+            switch ( aZoom )
+            {
+            case THeapCtrlZoom.EHeapCtrlZoomSmall:
+                ret = new Size( 0, 0 );
+                break;
+            default:
+            case THeapCtrlZoom.EHeapCtrlZoomMedium:
+                ret = new Size( 0, 0 );
+                break;
+            case THeapCtrlZoom.EHeapCtrlZoomMaximum:
+                ret = new Size( 0, 0 );
+                break;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public FactoryRenderers Renderers
+        {
+            get { return iRenderers; }
+        }
+
+        public IHeapCellPopupManager PopupManager
+        {
+            get { return iPopupManager; }
+            protected set { iPopupManager = value; }
+        }
+        #endregion
+
+        #region Data members
+        private IHeapCellPopupManager iPopupManager;
+        private FactoryRenderers iRenderers = new FactoryRenderers();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByAge.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Managers;
+using HeapCtrlLib.Renderers.Headers;
+using HeapCtrlLib.Renderers.SelectionBorders;
+using HeapCtrlLib.Renderers.Contents;
+using HeapCtrlLib.Renderers.ContentBorders;
+
+namespace HeapCtrlLib.Factories
+{
+	internal class FactoryByAge : Factory
+	{
+        #region Constructors & destructor
+        public FactoryByAge()
+		{
+            base.Renderers.Header = new HeapCellRendererRowHeader();
+            base.Renderers.SelectionBorder = new HeapCellRendererSelectionBorder( Color.Magenta, Color.Green );
+            base.Renderers.Content = new HeapCellRendererColourByAge();
+            base.Renderers.ContentBorder = new HeapCellRendererContentBorder3d();
+            //
+            PopupManager = new PopupManagerByAge();
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByCellType.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Managers;
+using HeapCtrlLib.Renderers.Headers;
+using HeapCtrlLib.Renderers.SelectionBorders;
+using HeapCtrlLib.Renderers.Contents;
+using HeapCtrlLib.Renderers.ContentBorders;
+using HeapCtrlLib.Types;
+
+namespace HeapCtrlLib.Factories
+{
+	internal class FactoryByCellType : Factory
+	{
+        #region Constructors & destructor
+        public FactoryByCellType()
+		{
+            base.Renderers.Header = new HeapCellRendererRowHeader();
+            base.Renderers.SelectionBorder = new HeapCellRendererSelectionBorder();
+            base.Renderers.Content = new HeapCellRendererColourByCellType();
+            base.Renderers.ContentBorder = new HeapCellRendererContentBorderFloating();
+            //
+            PopupManager = new PopupManagerByAge();
+        }
+        #endregion
+
+        #region API - From FactoryBase 
+        public override Size CellBoxSize( THeapCtrlZoom aZoom )
+        {
+            Size ret = new Size( 0, 0 );
+            //
+            switch ( aZoom )
+            {
+            case THeapCtrlZoom.EHeapCtrlZoomSmall:
+                ret = new Size( 10, 10 );
+                break;
+            default:
+            case THeapCtrlZoom.EHeapCtrlZoomMedium:
+                ret = new Size( 22, 22 );
+                break;
+            case THeapCtrlZoom.EHeapCtrlZoomMaximum:
+                ret = new Size( 36, 36 );
+                break;
+            }
+            //
+            return ret;
+        }
+
+        public override Size CellPadding( THeapCtrlZoom aZoom )
+        {
+            Size ret = new Size( 0, 0 );
+            //
+            switch ( aZoom )
+            {
+            case THeapCtrlZoom.EHeapCtrlZoomSmall:
+                ret = new Size( 3, 3 );
+                break;
+            default:
+            case THeapCtrlZoom.EHeapCtrlZoomMedium:
+                ret = new Size( 3, 3 );
+                break;
+            case THeapCtrlZoom.EHeapCtrlZoomMaximum:
+                ret = new Size( 3, 3 );
+                break;
+            }
+            //
+            return ret;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByEmbeddedReferences.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Managers;
+using HeapCtrlLib.Renderers.Headers;
+using HeapCtrlLib.Renderers.SelectionBorders;
+using HeapCtrlLib.Renderers.Contents;
+using HeapCtrlLib.Renderers.ContentBorders;
+
+namespace HeapCtrlLib.Factories
+{
+	internal class FactoryByEmbeddedReferences : Factory
+	{
+        #region Constructors & destructor
+        public FactoryByEmbeddedReferences()
+		{
+            base.Renderers.Header = new HeapCellRendererRowHeader();
+            base.Renderers.SelectionBorder = new HeapCellRendererSelectionBorder();
+            base.Renderers.Content = new HeapCellRendererColourByEmbeddedReferences();
+            base.Renderers.ContentBorder = new HeapCellRendererContentBorder3d();
+            //
+            PopupManager = new PopupManagerByEmbeddedReferences();
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByIsolation.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Managers;
+using HeapCtrlLib.Renderers.Headers;
+using HeapCtrlLib.Renderers.SelectionBorders;
+using HeapCtrlLib.Renderers.Contents;
+using HeapCtrlLib.Renderers.ContentBorders;
+
+namespace HeapCtrlLib.Factories
+{
+	internal class FactoryByIsolation : Factory
+	{
+        #region Constructors & destructor
+        public FactoryByIsolation()
+		{
+            base.Renderers.Header = new HeapCellRendererRowHeader();
+            base.Renderers.SelectionBorder = new HeapCellRendererSelectionBorder();
+            base.Renderers.Content = new HeapCellRendererColourByIsolation();
+            base.Renderers.ContentBorder = new HeapCellRendererContentBorder3d();
+            //
+            PopupManager = new PopupManagerByAge();
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByLength.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Managers;
+using HeapCtrlLib.Renderers.Headers;
+using HeapCtrlLib.Renderers.SelectionBorders;
+using HeapCtrlLib.Renderers.Contents;
+using HeapCtrlLib.Renderers.ContentBorders;
+
+namespace HeapCtrlLib.Factories
+{
+	internal class FactoryByLength : Factory
+	{
+        #region Constructors & destructor
+        public FactoryByLength()
+		{
+            base.Renderers.Header = new HeapCellRendererRowHeader();
+            base.Renderers.SelectionBorder = new HeapCellRendererSelectionBorder( Color.Magenta, Color.Green );
+            base.Renderers.Content = new HeapCellRendererColourByLength();
+            base.Renderers.ContentBorder = new HeapCellRendererContentBorder3d();
+            //
+            PopupManager = new PopupManagerByAge();
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryByObject.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,130 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Managers;
+using HeapCtrlLib.Renderers.Headers;
+using HeapCtrlLib.Renderers.SelectionBorders;
+using HeapCtrlLib.Renderers.Contents;
+using HeapCtrlLib.Renderers.ContentBorders;
+using HeapCtrlLib.Utilities;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics.Tracking.Base;
+using SymbianUtils.Colour;
+
+namespace HeapCtrlLib.Factories
+{
+	internal class FactoryByObject : Factory
+	{
+        #region Constructors & destructor
+        public FactoryByObject()
+		{
+            base.Renderers.Header = new HeapCellRendererRowHeader();
+            base.Renderers.SelectionBorder = new HeapCellRendererSelectionBorder();
+            base.Renderers.Content = new HeapCellRendererColourByObject();
+            base.Renderers.ContentBorder = new HeapCellRendererContentBorder3d();
+            //
+            PopupManager = new PopupManagerByAge();
+        }
+        #endregion
+
+        #region API
+        internal void PrepareColourHashes( HeapReconstructor aReconstructor, List<KnownColor> aStandardColours )
+        {
+            if ( iColourHashes.Count == 0 )
+            {
+                // Pick colours at random from the standard colours until we have used them all
+                System.Random random = new Random( 0 );
+
+                // How many objects do we have to colourise?
+                int count = aReconstructor.Statistics.StatsAllocated.TrackerObjects.Count;
+                for ( int i = 0; i < count; i++ )
+                {
+                    // Get associated symbol item
+                    TrackingInfo item = aReconstructor.Statistics.StatsAllocated.TrackerObjects[ i ];
+
+                    // Get object name
+                    string caption = item.Symbol.ObjectWithoutSection;
+
+                    // If we still have some system colours left, then we'll
+                    // try to use them up. Otherwise, we'll resort to generating
+                    // random colors.
+                    Color col = Color.Black;
+                    //
+                    if ( aStandardColours.Count > 0 )
+                    {
+                        // Get system colour index
+                        int colIndex = random.Next( 0, aStandardColours.Count - 1 );
+
+                        // Link colour with symbol
+                        KnownColor knownCol = (KnownColor) aStandardColours[ colIndex ];
+                        col = Color.FromKnownColor( knownCol );
+
+                        // Remove known colour so we don't use it again
+                        aStandardColours.RemoveAt( colIndex );
+                    }
+                    else
+                    {
+                        // Get random known colour
+                        col = iColorUtil.GenerateRandomColour( random );
+                    }
+
+                    // Associate object with colour
+                    iColourHashes.Add( item.Symbol.ObjectWithoutSection, caption, col, item );
+                }
+            }
+        }
+        #endregion
+
+        #region Properties
+        internal HeapCellFilterTripletDictionary ColourHashes
+        {
+            get { return iColourHashes; }
+            set { iColourHashes = value; }
+        }
+        #endregion
+
+        #region Data members
+        private HeapCellFilterTripletDictionary iColourHashes = new HeapCellFilterTripletDictionary();
+        private ColourGenerationUtil iColorUtil = new ColourGenerationUtil();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryBySymbol.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Text;
+using System.Collections;
+using System.Collections.Generic;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Managers;
+using HeapCtrlLib.Renderers.Headers;
+using HeapCtrlLib.Renderers.SelectionBorders;
+using HeapCtrlLib.Renderers.Contents;
+using HeapCtrlLib.Renderers.ContentBorders;
+using HeapCtrlLib.Utilities;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics.Tracking.Base;
+using SymbianUtils.Colour;
+
+namespace HeapCtrlLib.Factories
+{
+	internal class FactoryBySymbol : Factory
+	{
+        #region Constructors & destructor
+        public FactoryBySymbol()
+		{
+            base.Renderers.Header = new HeapCellRendererRowHeader();
+            base.Renderers.SelectionBorder = new HeapCellRendererSelectionBorder();
+            base.Renderers.Content = new HeapCellRendererColourBySymbol();
+            base.Renderers.ContentBorder = new HeapCellRendererContentBorder3d();
+            //
+            PopupManager = new PopupManagerBySymbol();
+        }
+        #endregion
+
+        #region API
+        internal void PrepareColourHashes( HeapReconstructor aReconstructor, List<KnownColor> aStandardColours )
+        {
+            if ( iColourHashes.Count == 0 )
+            {
+                // Pick colours at random from the standard colours until we have used them all
+                System.Random random = new Random( 0 );
+
+                // How many objects do we have to colourise?
+                int count = aReconstructor.Statistics.StatsAllocated.TrackerSymbols.Count;
+                for ( int i = 0; i < count; i++ )
+                {
+                    // Get associated symbol item
+                    TrackingInfo item = aReconstructor.Statistics.StatsAllocated.TrackerSymbols[ i ];
+
+                    // Form caption
+                    string caption = item.Symbol.NameWithoutVTablePrefix;
+
+                    // If we still have some system colours left, then we'll
+                    // try to use them up. Otherwise, we'll resort to generating
+                    // random colors.
+                    Color col = Color.Black;
+                    //
+                    if ( aStandardColours.Count > 0 )
+                    {
+                        // Get system colour index
+                        int colItemIndex = random.Next( 0, aStandardColours.Count - 1 );
+
+                        // Link colour with symbol
+                        KnownColor knownCol = (KnownColor) aStandardColours[ colItemIndex ];
+                        col = Color.FromKnownColor( knownCol );
+
+                        // Remove known colour so we don't use it again
+                        aStandardColours.RemoveAt( colItemIndex );
+                    }
+                    else
+                    {
+                        // Get random known colour
+                        col = iColorUtil.GenerateRandomColour( random );
+                    }
+
+                    // Associate object with colour
+                    string hash = HeapCellRendererColourBySymbol.MakeColourHash( item.Symbol );
+                    iColourHashes.Add( hash, caption, col, item );
+                }
+            }
+        }
+        #endregion
+
+        #region Properties
+        internal HeapCellFilterTripletDictionary ColourHashes
+        {
+            get { return iColourHashes; }
+            set { iColourHashes = value; }
+        }
+        #endregion
+
+        #region Data members
+        private HeapCellFilterTripletDictionary iColourHashes = new HeapCellFilterTripletDictionary();
+        private ColourGenerationUtil iColorUtil = new ColourGenerationUtil();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Factories/FactoryRenderers.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Types;
+using HeapCtrlLib.Utilities;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapCtrlLib.Renderers;
+
+namespace HeapCtrlLib.Factories
+{
+    internal class FactoryRenderers
+    {
+        #region Constructors
+        public FactoryRenderers()
+        {
+        }
+        #endregion
+
+        #region API
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+            SelectionBorder.Initialise( aCells, aReconstructor, aRenderer );
+            Header.Initialise( aCells, aReconstructor, aRenderer );
+            Content.Initialise( aCells, aReconstructor, aRenderer );
+            ContentBorder.Initialise( aCells, aReconstructor, aRenderer );
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+            SelectionBorder.PrepareToNavigate( aNavigator );
+            Header.PrepareToNavigate( aNavigator );
+            Content.PrepareToNavigate( aNavigator );
+            ContentBorder.PrepareToNavigate( aNavigator );
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+            SelectionBorder.RenderingComplete( aGraphics );
+            Header.RenderingComplete( aGraphics );
+            Content.RenderingComplete( aGraphics );
+            ContentBorder.RenderingComplete( aGraphics );
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+            SelectionBorder.HeapCellRenderingComplete( aGraphics, aCell, aMetaData );
+            Header.HeapCellRenderingComplete( aGraphics, aCell, aMetaData );
+            Content.HeapCellRenderingComplete( aGraphics, aCell, aMetaData );
+            ContentBorder.HeapCellRenderingComplete( aGraphics, aCell, aMetaData );
+        }
+        
+        public bool CheckIfAnyItemsInvalid()
+        {
+            bool invalid = ( iHeader == null || iBorderContent == null || iBorderSelection == null || iContent == null );
+            return invalid;
+        }
+        #endregion
+
+        #region Properties
+        public IHeapCellRendererRowHeader Header
+        {
+            get { return iHeader; }
+            set { iHeader = value; }
+        }
+
+        public IHeapCellRendererSelectionBorder SelectionBorder
+        {
+            get { return iBorderSelection; }
+            set { iBorderSelection = value; }
+        }
+
+        public IHeapCellRendererContent Content
+        {
+            get { return iContent; }
+            set { iContent = value; }
+        }
+
+        public IHeapCellRendererContentBorder ContentBorder
+        {
+            get { return iBorderContent; }
+            set { iBorderContent = value; }
+        }
+        #endregion
+
+        #region Data members
+        private IHeapCellRendererRowHeader iHeader;
+        private IHeapCellRendererSelectionBorder iBorderSelection;
+        private IHeapCellRendererContent iContent;
+        private IHeapCellRendererContentBorder iBorderContent;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/HeapCtrlLib.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,296 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <ProjectType>Local</ProjectType>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{4883C5F9-B83E-4262-8389-879AC9E1DF1B}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ApplicationIcon>
+    </ApplicationIcon>
+    <AssemblyKeyContainerName>
+    </AssemblyKeyContainerName>
+    <AssemblyName>HeapCtrlLib</AssemblyName>
+    <AssemblyOriginatorKeyFile>
+    </AssemblyOriginatorKeyFile>
+    <DefaultClientScript>JScript</DefaultClientScript>
+    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+    <DefaultTargetSchema>IE50</DefaultTargetSchema>
+    <DelaySign>false</DelaySign>
+    <OutputType>Library</OutputType>
+    <RootNamespace>HeapCtrlLib</RootNamespace>
+    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+    <StartupObject>
+    </StartupObject>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>true</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>false</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>false</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>none</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System">
+      <Name>System</Name>
+    </Reference>
+    <Reference Include="System.Data">
+      <Name>System.Data</Name>
+    </Reference>
+    <Reference Include="System.Design" />
+    <Reference Include="System.Drawing">
+      <Name>System.Drawing</Name>
+    </Reference>
+    <Reference Include="System.Windows.Forms">
+      <Name>System.Windows.Forms</Name>
+    </Reference>
+    <Reference Include="System.Xml">
+      <Name>System.XML</Name>
+    </Reference>
+    <Reference Include="XPTable, Version=1.1.13.21130, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\PerfToolsSharedLibraries\3rd Party\XPTable\bin\Debug\XPTable.dll</HintPath>
+    </Reference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianStructuresLib\SymbianStructuresLib.csproj">
+      <Project>{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}</Project>
+      <Name>SymbianStructuresLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\UI\SymbianUtilsUi\SymbianUtilsUi.csproj">
+      <Project>{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}</Project>
+      <Name>SymbianUtilsUi</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Engine\HeapLib\HeapLib.csproj">
+      <Project>{D638AB12-FC64-4523-9B99-09F20BC2A791}</Project>
+      <Name>HeapLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapDataControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapFilteringControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapFilteringControl.Designer.cs">
+      <DependentUpon>HeapFilteringControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Dialogs\HeapRendererFilterConfigDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Dialogs\HeapRendererFilterConfigDialog.Designer.cs">
+      <DependentUpon>HeapRendererFilterConfigDialog.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Factories\FactoryRenderers.cs" />
+    <Compile Include="Factories\FactoryByEmbeddedReferences.cs" />
+    <Compile Include="Factories\FactoryByIsolation.cs" />
+    <Compile Include="Factories\Factory.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Factories\FactoryByAge.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Factories\FactoryByCellType.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Factories\FactoryByLength.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Factories\FactoryByObject.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Factories\FactoryBySymbol.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Interfaces\HeapCellPopupManager.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Interfaces\HeapCellRenderers.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Popups\Forms\PopupCellRelationshipInfo.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Popups\Forms\PopupBase.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Popups\Forms\PopupCellAllocatedRaw.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Popups\Forms\PopupCellAllocatedSymbol.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Popups\Forms\PopupCellFree.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Popups\Forms\PopupMultiCellSelection.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Popups\Managers\PopupManagerByEmbeddedReferences.cs" />
+    <Compile Include="Popups\Managers\PopupManagerBase.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Popups\Managers\PopupManagerByAge.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Popups\Managers\PopupManagerBySymbol.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\ContentBorders\HeapCellRendererContentBorder3d.cs" />
+    <Compile Include="Renderers\ContentBorders\HeapCellRendererContentBorderFloating.cs" />
+    <Compile Include="Renderers\ContentBorders\HeapCellRendererContentBorder.cs" />
+    <Compile Include="Renderers\SelectionBorders\HeapCellRendererSelectionBorderItem.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\SelectionBorders\HeapCellRendererSelectionBorder.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Contents\Bases\HeapCellRendererByColour.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Contents\Bases\HeapCellRendererWithText.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Contents\HeapCellRendererColourByEmbeddedReferences.cs" />
+    <Compile Include="Renderers\Contents\HeapCellRendererColourByIsolation.cs" />
+    <Compile Include="Renderers\Contents\HeapCellRendererColourByAge.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Contents\HeapCellRendererColourByCellType.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Contents\HeapCellRendererColourByLength.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Contents\HeapCellRendererColourByObject.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Contents\HeapCellRendererColourBySymbol.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\RowHeader\HeapCellRendererRowHeader.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\HeapDataRenderer.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Types\HeapCellCtrlTypes.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Renderers\Utilities\HeapCellRendererColour.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Utilities\HeapSelectionBorderType.cs" />
+    <Compile Include="Utilities\HeapCellBorderType.cs" />
+    <Compile Include="Utilities\HeapCellBorderInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Utilities\HeapCellFilterTriplet.cs" />
+    <Compile Include="Utilities\HeapCellLargestRectangleCalculator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Utilities\HeapCellMetaData.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Utilities\HeapRenderingNavigator.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <EmbeddedResource Include="Controls\HeapDataControl.resx">
+      <DependentUpon>HeapDataControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Controls\HeapFilteringControl.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>HeapFilteringControl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Dialogs\HeapRendererFilterConfigDialog.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>HeapRendererFilterConfigDialog.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Popups\Forms\PopupCellRelationshipInfo.resx">
+      <DependentUpon>PopupCellRelationshipInfo.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Popups\Forms\PopupBase.resx">
+      <DependentUpon>PopupBase.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Popups\Forms\PopupCellAllocatedRaw.resx">
+      <DependentUpon>PopupCellAllocatedRaw.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Popups\Forms\PopupCellAllocatedSymbol.resx">
+      <DependentUpon>PopupCellAllocatedSymbol.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Popups\Forms\PopupCellFree.resx">
+      <DependentUpon>PopupCellFree.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Popups\Forms\PopupMultiCellSelection.resx">
+      <DependentUpon>PopupMultiCellSelection.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Renderers\HeapDataRenderer.resx">
+      <DependentUpon>HeapDataRenderer.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>
+    </PreBuildEvent>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/HeapCtrlLib.csproj.user	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,58 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <LastOpenVersion>7.10.6030</LastOpenVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ReferencePath>
+    </ReferencePath>
+    <CopyProjectDestinationFolder>
+    </CopyProjectDestinationFolder>
+    <CopyProjectUncPath>
+    </CopyProjectUncPath>
+    <CopyProjectOption>0</CopyProjectOption>
+    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectTrust>0</ProjectTrust>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Interfaces/HeapCellPopupManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using SymbianUtils.RawItems;
+using HeapCtrlLib.Popups.Forms;
+
+namespace HeapCtrlLib.Interfaces
+{
+    internal interface IHeapCellPopupManager
+    {
+        #region Properties
+        bool Visible { get; }
+        PopupBase Popup { get; }
+        bool SupportsRawItemInfo { get; }
+        #endregion
+
+        #region API
+        void PopupHide();
+        void PopupShowAsync( HeapCell aCell, RawItem aItem, HeapStatistics aStats, Point aLocalControlCoordiantes, Point aScreenCoordinates, Size aOffsetBy, System.Windows.Forms.KeyEventHandler aKeyHandler );
+        void PopupShowAsync( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordiantes, Point aScreenCoordinates, Size aOffsetBy, System.Windows.Forms.KeyEventHandler aKeyHandler );
+        void PopupRelocate( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordiantes, Point aScreenCoordinates, Size aOffsetBy );
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Interfaces/HeapCellRenderers.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapLib;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+
+namespace HeapCtrlLib.Interfaces
+{
+    internal interface IHeapCellRendererBase
+    {
+        void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer );
+        void RenderingComplete( Graphics aGraphics );
+        void PrepareToNavigate( HeapRenderingNavigator aNavigator );
+        void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData );
+    }
+
+    // Paints the address label at the start of each row
+    internal interface IHeapCellRendererRowHeader : IHeapCellRendererBase
+    {
+        int MeasureCellHeaderText( Graphics aGraphics );
+        void PaintRowHeader( Graphics aGraphics, Point aPosition, Size aSize, uint aAddress );
+    }
+
+    // Paints the selection outline for keyboard and mouse selected heap cells
+    internal interface IHeapCellRendererSelectionBorder : IHeapCellRendererBase
+    {
+        void PaintSelectionBorder( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize, THeapSelectionBorderType aType );
+    }
+
+    // Paints any outline around individual heap cell boxes.
+    internal interface IHeapCellRendererContentBorder : IHeapCellRendererBase
+    {
+        void PaintContentBorder( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize );
+    }
+
+    // Paints heap cell box content
+    internal interface IHeapCellRendererContent : IHeapCellRendererBase
+    {
+        bool SupportsFiltering { get; }
+        void SetupFilters();
+        void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,626 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using SymbianUtils.RawItems;
+using SymbianUtils.Colour;
+
+namespace HeapCtrlLib.Popups.Forms
+{
+    public class PopupBase : System.Windows.Forms.Form
+    {
+        #region Delegates and events
+        public delegate void BackgroundColourChangeHandler( Color aColour );
+        public event BackgroundColourChangeHandler ColourChangeBackground;
+        public delegate void TitleColourChangeHandler( Color aColour );
+        public event TitleColourChangeHandler ColourChangeTitle;
+        #endregion
+
+        #region Windows Form Designer data members
+        private System.ComponentModel.IContainer components;
+        private System.Windows.Forms.Timer iTimer;
+        private System.Windows.Forms.Label iLbl_Title;
+        private System.Windows.Forms.Label iLbl_Footer;
+        private System.Windows.Forms.Label iLbl_Title_Length_Payload;
+        private System.Windows.Forms.Label iLbl_Footer_Percentage_OfTotal;
+        private System.Windows.Forms.Label iLbl_Footer_Percentage_OfType;
+        private System.Windows.Forms.Label iLbl_Title_Length_Header;
+        #endregion
+
+        #region Constructors & destructor
+        public PopupBase()
+        {
+            InitializeComponent();
+            //
+            this.SetStyle( ControlStyles.UserPaint, true );
+            this.SetStyle( ControlStyles.DoubleBuffer, true );
+            this.SetStyle( ControlStyles.AllPaintingInWmPaint, true );
+            this.SetStyle( ControlStyles.ResizeRedraw, true );
+            this.SetStyle( ControlStyles.Selectable, false );
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if( disposing )
+            {
+                if(components != null)
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+        #region Windows Form Designer generated code
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            this.iLbl_Title = new System.Windows.Forms.Label();
+            this.iLbl_Title_Length_Payload = new System.Windows.Forms.Label();
+            this.iLbl_Title_Length_Header = new System.Windows.Forms.Label();
+            this.iLbl_Footer = new System.Windows.Forms.Label();
+            this.iTimer = new System.Windows.Forms.Timer( this.components );
+            this.iLbl_Footer_Percentage_OfTotal = new System.Windows.Forms.Label();
+            this.iLbl_Footer_Percentage_OfType = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iLbl_Title
+            // 
+            this.iLbl_Title.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Title.BackColor = System.Drawing.Color.Gainsboro;
+            this.iLbl_Title.Font = new System.Drawing.Font( "Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Title.ForeColor = System.Drawing.Color.SlateGray;
+            this.iLbl_Title.Location = new System.Drawing.Point( 1, 1 );
+            this.iLbl_Title.Name = "iLbl_Title";
+            this.iLbl_Title.Size = new System.Drawing.Size( 518, 22 );
+            this.iLbl_Title.TabIndex = 0;
+            this.iLbl_Title.Text = "Popup Title";
+            this.iLbl_Title.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Title_Length_Payload
+            // 
+            this.iLbl_Title_Length_Payload.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Title_Length_Payload.BackColor = System.Drawing.Color.Gainsboro;
+            this.iLbl_Title_Length_Payload.Font = new System.Drawing.Font( "Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Title_Length_Payload.ForeColor = System.Drawing.Color.SlateGray;
+            this.iLbl_Title_Length_Payload.Location = new System.Drawing.Point( 408, 1 );
+            this.iLbl_Title_Length_Payload.Name = "iLbl_Title_Length_Payload";
+            this.iLbl_Title_Length_Payload.Size = new System.Drawing.Size( 104, 22 );
+            this.iLbl_Title_Length_Payload.TabIndex = 0;
+            this.iLbl_Title_Length_Payload.Text = "P: [00056024]";
+            this.iLbl_Title_Length_Payload.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            this.iLbl_Title_Length_Payload.TextChanged += new System.EventHandler( this.iLbl_TextChanged );
+            // 
+            // iLbl_Title_Length_Header
+            // 
+            this.iLbl_Title_Length_Header.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Title_Length_Header.BackColor = System.Drawing.Color.Gainsboro;
+            this.iLbl_Title_Length_Header.Font = new System.Drawing.Font( "Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Title_Length_Header.ForeColor = System.Drawing.Color.SlateGray;
+            this.iLbl_Title_Length_Header.Location = new System.Drawing.Point( 280, 1 );
+            this.iLbl_Title_Length_Header.Name = "iLbl_Title_Length_Header";
+            this.iLbl_Title_Length_Header.Size = new System.Drawing.Size( 120, 22 );
+            this.iLbl_Title_Length_Header.TabIndex = 0;
+            this.iLbl_Title_Length_Header.Text = "H: [2]";
+            this.iLbl_Title_Length_Header.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            this.iLbl_Title_Length_Header.TextChanged += new System.EventHandler( this.iLbl_TextChanged );
+            // 
+            // iLbl_Footer
+            // 
+            this.iLbl_Footer.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Footer.BackColor = System.Drawing.Color.Gainsboro;
+            this.iLbl_Footer.Font = new System.Drawing.Font( "Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Footer.ForeColor = System.Drawing.Color.SlateGray;
+            this.iLbl_Footer.Location = new System.Drawing.Point( 1, 119 );
+            this.iLbl_Footer.Name = "iLbl_Footer";
+            this.iLbl_Footer.Size = new System.Drawing.Size( 518, 24 );
+            this.iLbl_Footer.TabIndex = 2;
+            this.iLbl_Footer.Text = " Footer";
+            this.iLbl_Footer.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iTimer
+            // 
+            this.iTimer.Interval = 650;
+            this.iTimer.Tick += new System.EventHandler( this.iTimer_Tick );
+            // 
+            // iLbl_Footer_Percentage_OfTotal
+            // 
+            this.iLbl_Footer_Percentage_OfTotal.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Footer_Percentage_OfTotal.BackColor = System.Drawing.Color.Gainsboro;
+            this.iLbl_Footer_Percentage_OfTotal.Font = new System.Drawing.Font( "Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Footer_Percentage_OfTotal.ForeColor = System.Drawing.Color.SlateGray;
+            this.iLbl_Footer_Percentage_OfTotal.Location = new System.Drawing.Point( 416, 120 );
+            this.iLbl_Footer_Percentage_OfTotal.Name = "iLbl_Footer_Percentage_OfTotal";
+            this.iLbl_Footer_Percentage_OfTotal.Size = new System.Drawing.Size( 96, 22 );
+            this.iLbl_Footer_Percentage_OfTotal.TabIndex = 3;
+            this.iLbl_Footer_Percentage_OfTotal.Text = "T: [048.04%]";
+            this.iLbl_Footer_Percentage_OfTotal.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            this.iLbl_Footer_Percentage_OfTotal.TextChanged += new System.EventHandler( this.iLbl_TextChanged );
+            // 
+            // iLbl_Footer_Percentage_OfType
+            // 
+            this.iLbl_Footer_Percentage_OfType.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Footer_Percentage_OfType.BackColor = System.Drawing.Color.Gainsboro;
+            this.iLbl_Footer_Percentage_OfType.Font = new System.Drawing.Font( "Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Footer_Percentage_OfType.ForeColor = System.Drawing.Color.SlateGray;
+            this.iLbl_Footer_Percentage_OfType.Location = new System.Drawing.Point( 248, 120 );
+            this.iLbl_Footer_Percentage_OfType.Name = "iLbl_Footer_Percentage_OfType";
+            this.iLbl_Footer_Percentage_OfType.Size = new System.Drawing.Size( 96, 22 );
+            this.iLbl_Footer_Percentage_OfType.TabIndex = 3;
+            this.iLbl_Footer_Percentage_OfType.Text = "F: [089.49%]";
+            this.iLbl_Footer_Percentage_OfType.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+            this.iLbl_Footer_Percentage_OfType.TextChanged += new System.EventHandler( this.iLbl_TextChanged );
+            // 
+            // PopupBase
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 14 );
+            this.AutoScroll = true;
+            this.BackColor = System.Drawing.SystemColors.Control;
+            this.CausesValidation = false;
+            this.ClientSize = new System.Drawing.Size( 520, 144 );
+            this.ControlBox = false;
+            this.Controls.Add( this.iLbl_Footer_Percentage_OfType );
+            this.Controls.Add( this.iLbl_Footer_Percentage_OfTotal );
+            this.Controls.Add( this.iLbl_Footer );
+            this.Controls.Add( this.iLbl_Title_Length_Header );
+            this.Controls.Add( this.iLbl_Title_Length_Payload );
+            this.Controls.Add( this.iLbl_Title );
+            this.Enabled = false;
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "PopupBase";
+            this.Opacity = 0.85;
+            this.ShowInTaskbar = false;
+            this.TopMost = true;
+            this.Layout += new System.Windows.Forms.LayoutEventHandler( this.PopupBase_Layout );
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler( this.PopupBase_KeyDown );
+            this.ResumeLayout( false );
+
+        }
+        #endregion
+
+        #region Internal constants
+        #endregion
+
+        #region API
+        public void PopupShowAsync( Point aLocation, HeapCell aCell, RawItem aItem, HeapStatistics aStats, Size aOffset, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+            //System.Diagnostics.Debug.WriteLine( "PopupBase - Timer Started" );
+            iKeyHandler = aKeyHandler;
+
+            HeapCellArrayWithStatistics array = new HeapCellArrayWithStatistics();
+            array.Add( aCell );
+            PrepareContent( array, aStats, aItem );
+            //
+            iHoverPos = aLocation;
+            //
+            iShowPos = aLocation;
+            iShowPos.Offset( aOffset.Width, aOffset.Height );
+
+            // If we are using an async timer delay then we must start the timer and
+            // when it expires, the popup will become visible. Otherwise, we show
+            // the popup immediately.
+            if ( VisibilityDelay > 0 )
+            {
+                iTimer.Stop();
+                iTimer.Enabled = true;
+                iTimer.Start();
+            }
+            else
+            {
+                PopupShow();
+            }
+        }
+
+        public void PopupShowAsync( Point aLocation, HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Size aOffset, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+            //System.Diagnostics.Debug.WriteLine( "PopupBase - Timer Started" );
+            iKeyHandler = aKeyHandler;
+            PrepareContent( aCells, aStats );
+            //
+            iHoverPos = aLocation;
+            //
+            iShowPos = aLocation;
+            iShowPos.Offset( aOffset.Width, aOffset.Height );
+            
+            // If we are using an async timer delay then we must start the timer and
+            // when it expires, the popup will become visible. Otherwise, we show
+            // the popup immediately.
+            if  ( VisibilityDelay > 0 )
+            {
+                iTimer.Stop();
+                iTimer.Enabled = true;
+                iTimer.Start();
+            }
+            else
+            {
+                PopupShow();
+            }
+        }
+
+        public void PopupRelocate( Point aLocation, HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Size aOffset )
+        {
+            PrepareContent( aCells, aStats );
+            Invalidate();
+
+            iShowPos = aLocation;
+            iShowPos.Offset( aOffset.Width, aOffset.Height );
+
+            // Get the screen size
+            Rectangle rect = Screen.GetWorkingArea( this );
+
+            // Make sure that the popup is displayed within the screen bounds.
+            Point pos = iShowPos;
+            if  ( iShowPos.X + this.Width > rect.Right )
+            {
+                pos.X = rect.Width - this.Width;
+            }
+            if  ( iShowPos.Y + this.Height > rect.Bottom )
+            {
+                pos.Y = rect.Bottom - this.Height;
+            }
+            Location = pos;
+        }
+
+        public void PopupHide()
+        {
+            //System.Diagnostics.Debug.WriteLine( "PopupBase - Timer Cancelled" );
+            iTimer.Stop();
+            iTimer.Enabled = false;
+            iKeyHandler = null;
+            //
+            if  ( Visible )
+            {
+                //System.Diagnostics.Debug.WriteLine( "PopupBase - POPUP HIDDEN!" );
+                Hide();
+            }
+        }
+        #endregion
+
+        #region Framework API
+        public virtual void PrepareContent( HeapCellArrayWithStatistics aCells, HeapStatistics aStats )
+        {
+            // Set title and border colour 
+            HeapCell firstCell = aCells[ 0 ];
+            ColourTitle = HeapCtrlLib.Renderers.Utilities.HeapCellRendererColour.ColourByCellType( firstCell );
+            ColourBorder = ColourUtils.Darken( ColourTitle );
+
+            // Get stats
+            long lengthPayload = aCells.Statistics.SizeTotalPayload;
+            long lengthHeader = aCells.Statistics.SizeTotalHeader;
+            float lengthsAsHeapPercentage = aStats.CellLengthAsHeapPercentage( lengthHeader + lengthPayload );
+
+            // Header length
+            iLbl_Title_Length_Header.Text = "H: [" + lengthHeader.ToString("d6") + "]";
+
+            // Payload length
+            iLbl_Title_Length_Payload.Text = "P: [" + lengthPayload.ToString("d8") + "]";
+
+            // Set cell allocation number (for allocated cells) or then
+            // the cell index for free cells.
+            string heapSpecificPrefix = "H: ";
+            if  ( aCells.Count == 1 )
+            {
+                float lengthsAsTypePercentage = aStats.CellLengthAsTypePercentage( firstCell );
+                //
+                string typeSpecificPrefix = "A: ";
+                if ( firstCell.Type == HeapCell.TType.EFree )
+                {
+                    typeSpecificPrefix = "F: ";
+                }
+                //
+                if ( HeapCell.IsDebugAllocator )
+                {
+                    switch ( firstCell.Type )
+                    {
+                    case HeapCell.TType.EAllocated:
+                        iLbl_Footer.Text = "Alloc #: [" + firstCell.AllocationNumber.ToString( "d6" ) + " / " + aStats.StatsAllocated.CellAllocationNumberLargest.AllocationNumber.ToString( "d6" ) + "]";
+                        break;
+                    case HeapCell.TType.EFree:
+                        iLbl_Footer.Text = "Free cell #: [" + firstCell.AllocationNumber.ToString( "d4" ) + " / " + aStats.StatsFree.TypeCount.ToString( "d4" ) + "]";
+                        break;
+                    }
+                }
+                else
+                {
+                    iLbl_Footer.Text = "[ " + firstCell.Address.ToString( "x8" ) + " ]";
+                }
+                //
+                iLbl_Footer_Percentage_OfType.Text = typeSpecificPrefix + "[" + lengthsAsTypePercentage.ToString( "#00.00" ) + "%]";
+            }
+            else
+            {
+                heapSpecificPrefix = "Of Heap: ";
+                iLbl_Footer.Text = string.Empty;
+                iLbl_Footer_Percentage_OfType.Visible = false;
+            }
+            //
+            iLbl_Footer_Percentage_OfTotal.Text = heapSpecificPrefix + "[" + lengthsAsHeapPercentage.ToString( "#00.00" ) + "%]";
+        }
+
+        public virtual void PrepareContent( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, RawItem aRawItem )
+        {
+            PrepareContent( aCells, aStats );
+        }
+        #endregion
+
+        #region Properties
+        public bool ColourFromHoverCoordinate
+        {
+            get { return iColourFromHoverCoordinate; }
+            set { iColourFromHoverCoordinate = value; }
+        }
+
+        public int VisibilityDelay
+        {
+            get { return iVisibilityDelay; }
+            set
+            {
+                iVisibilityDelay = value;
+                if  ( iVisibilityDelay > 0 )
+                {
+                    iTimer.Interval = iVisibilityDelay;
+                }
+            }
+        }
+
+        public Color ColourBackground
+        {
+            get { return iColourBackground; }
+            set
+            {
+                iColourBackground = value;
+                //
+                if  ( ColourChangeBackground != null )
+                {
+                    ColourChangeBackground( value );
+                }
+            }
+        }
+
+        public Color ColourTitle
+        {
+            get { return iLbl_Title.BackColor; }
+            set
+            {
+                iLbl_Title.BackColor = value;
+                iLbl_Title_Length_Header.BackColor = value;
+                iLbl_Title_Length_Payload.BackColor = value;
+                
+                // Make the footer slightly lighter
+                iLbl_Footer.BackColor = ColourUtils.Lighten( value );
+                iLbl_Footer_Percentage_OfTotal.BackColor = iLbl_Footer.BackColor;
+                iLbl_Footer_Percentage_OfType.BackColor = iLbl_Footer.BackColor;
+                //
+                if  ( ColourChangeTitle != null )
+                {
+                    ColourChangeTitle( value );
+                }
+            }
+        }
+
+        public Color ColourBorder
+        {
+            get { return iColourBorder; }
+            set { iColourBorder = value; }
+        }
+
+        public string Title
+        {
+            get { return iLbl_Title.Text; }
+            set { iLbl_Title.Text = value; }
+        }
+        
+        public Rectangle ClientRect
+        {
+            get
+            {
+                Size paddingSize = new Size( 2, 2 );
+
+                // Calculate bottom right corner position
+                Point bottomRightPos = new Point();
+                bottomRightPos.X = ( Width - 1 ) - paddingSize.Width;
+                bottomRightPos.Y = ( Height - 1 - iLbl_Footer.Height - 1 ) - paddingSize.Height;
+
+                // Calculate top left
+                Point topLeft = new Point();
+                topLeft.X = 1 + paddingSize.Width;
+                topLeft.Y = 1 + iLbl_Title.Height + 1 + paddingSize.Height;
+
+                // Set rect
+                Rectangle ret = new Rectangle();
+                ret.Location = topLeft;
+                ret.Size = new Size( bottomRightPos.X - topLeft.X, bottomRightPos.Y - topLeft.Y );
+ 
+                return ret;
+            }
+        }
+        #endregion
+
+        #region Drawing
+        protected override void OnPaint( PaintEventArgs aArgs )
+        {
+            aArgs.Graphics.Clear( ColourBackground );					
+            //
+            using( Pen borderPen = new Pen( ColourBorder ) )
+            {
+                // Border
+                aArgs.Graphics.DrawRectangle( borderPen, 0, 0, Width-1, Height-1 );
+
+                int yPos;
+
+                // Draw a line underneath the title label
+                yPos = iLbl_Title.Top + iLbl_Title.Height;
+                aArgs.Graphics.DrawLine( borderPen, 0, yPos, Width, yPos );
+
+                // Draw a line above the footer label
+                yPos = iLbl_Footer.Top - 1;
+                aArgs.Graphics.DrawLine( borderPen, 0, yPos, Width, yPos );
+            }
+            //
+            base.OnPaint( aArgs );
+        }
+        #endregion
+
+        #region Events
+        private void iTimer_Tick( object sender, System.EventArgs e )
+        {
+            iTimer.Stop();
+            iTimer.Enabled = false;
+            //
+            PopupShow();
+            //System.Diagnostics.Debug.WriteLine( "Timer TICK: [ " + Location.X + ", " + Location.Y + " ] -> Popup Shown" );
+        }
+
+        private void PopupBase_KeyDown(object sender, KeyEventArgs e)
+        {
+            if  ( iKeyHandler != null )
+            {
+                iKeyHandler( this, e );
+            }
+        }
+
+        private void PopupBase_Layout(object sender, System.Windows.Forms.LayoutEventArgs e)
+        {
+            iLbl_Title_Length_Payload.Location = new Point( Width - iLbl_Title_Length_Payload.Width - 1, 1 );
+            iLbl_Title_Length_Header.Location = new Point( iLbl_Title_Length_Payload.Location.X - iLbl_Title_Length_Header.Width - 10, 1 );
+            //
+            iLbl_Title.Location = new Point( 1, 1 );
+            iLbl_Title.Width = Width - 2;
+            iLbl_Title.SendToBack();
+            //
+            iLbl_Footer.Location = new Point( 1, Height - iLbl_Footer.Height - 1 );
+            iLbl_Footer.Width = Width - 2;
+            //
+            iLbl_Footer_Percentage_OfTotal.Location = new Point( Width - iLbl_Footer_Percentage_OfTotal.Width - 1, iLbl_Footer.Location.Y );
+            iLbl_Footer_Percentage_OfType.Location = new Point( iLbl_Footer_Percentage_OfTotal.Location.X - iLbl_Footer_Percentage_OfType.Width - 10, iLbl_Footer.Location.Y );
+        }
+
+        private void iLbl_TextChanged( object sender, System.EventArgs e )
+        {
+            Label lbl = (Label) sender;
+            lbl.Width = lbl.PreferredWidth;
+            //System.Diagnostics.Debug.WriteLine( "Label [" + lbl.Text + "], width now: " + lbl.Width + ", preferredWid: " + lbl.PreferredWidth );
+        }
+        #endregion
+
+        #region Internal methods
+        private void PopupShow()
+        {
+            //System.Diagnostics.Debug.WriteLine( "PopupBase - POPUP SHOW NOW - Visible: " + Visible + ", iShowPos[ " + iShowPos.X + ", " + iShowPos.Y + " ]" );
+
+            if  ( !Visible )
+            {
+                // Should we colourise the form header & footer
+                // based upon the mouse co-ordinates at the time of
+                // the asynch display?
+                if  ( ColourFromHoverCoordinate )
+                {
+                    using( Bitmap bmp = new Bitmap( 1, 1 ) )
+                    {
+                        using( Graphics gfx = Graphics.FromImage( bmp ) )
+                        {
+                            Color c = SymbianUtils.Graphics.ScreenUtils.ColorAtPixel( iHoverPos );
+                            ColourTitle = c;
+
+                            // Make the border slightly darker
+                            ColourBorder = ColourUtils.Darken( ColourTitle );
+                        }
+                    }
+                }
+
+                // Get the screen size
+                Rectangle rect = Screen.GetWorkingArea( this );
+
+                // Make sure that the popup is displayed within the screen bounds.
+                Point pos = iShowPos;
+                if  ( iShowPos.X + this.Width > rect.Right )
+                {
+                    pos.X = rect.Width - this.Width;
+                }
+                if  ( iShowPos.Y + this.Height > rect.Bottom )
+                {
+                    pos.Y = rect.Bottom - this.Height;
+                }
+
+                // Now make the form visible and topmost.
+                ShowWindow( this.Handle, SW_SHOWNOACTIVATE );
+                SetWindowPos( this.Handle, HWND_TOP_MOST, pos.X, pos.Y, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
+                Location = pos;
+            }
+        }
+        #endregion
+
+        #region Unmanaged code
+        private static IntPtr HWND_TOP_MOST = (IntPtr)(-1);
+        private static IntPtr HWND_NOTOPMOST = (IntPtr)(-2);
+        private const uint SWP_NOMOVE = 0x2;
+        private const uint SWP_NOSIZE = 0x1;
+        private const int SW_SHOWNOACTIVATE = 4;
+
+        [DllImport("user32.dll")]
+        public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
+        [DllImport("user32.dll")]
+        public  static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
+        #endregion
+
+        #region Data members
+        private int iVisibilityDelay = 700;
+        private bool iColourFromHoverCoordinate = false;
+        private Point iHoverPos;
+        private Point iShowPos;
+        private Color iColourBackground = Color.White;
+        private Color iColourBorder = Color.Black;
+        private System.Windows.Forms.KeyEventHandler iKeyHandler = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupBase.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedRaw.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,344 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Popups.Forms
+{
+	public class PopupCellAllocatedRaw : PopupBase
+	{
+        #region Windows Form Designer data members
+        private System.ComponentModel.IContainer components = null;
+        private System.Windows.Forms.Label iLbl_Values1;
+        private System.Windows.Forms.Label iLbl_Values2;
+        private System.Windows.Forms.Label iLbl_Values3;
+        private System.Windows.Forms.Label iLbl_Values4;
+        private System.Windows.Forms.Label iLbl_Chars1;
+        private System.Windows.Forms.Label iLbl_Chars2;
+        private System.Windows.Forms.Label iLbl_Chars3;
+        private System.Windows.Forms.Label iLbl_Chars4;
+        #endregion
+
+        #region Constructors & destructor
+        public PopupCellAllocatedRaw()
+		{
+			InitializeComponent();
+            //
+            this.SetStyle( ControlStyles.UserPaint, true );
+            this.SetStyle( ControlStyles.DoubleBuffer, true );
+            this.SetStyle( ControlStyles.AllPaintingInWmPaint, true );
+            this.SetStyle( ControlStyles.ResizeRedraw, true );
+            this.SetStyle( ControlStyles.Selectable, false );
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if( disposing )
+            {
+                if (components != null) 
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.iLbl_Values1 = new System.Windows.Forms.Label();
+            this.iLbl_Values2 = new System.Windows.Forms.Label();
+            this.iLbl_Values3 = new System.Windows.Forms.Label();
+            this.iLbl_Values4 = new System.Windows.Forms.Label();
+            this.iLbl_Chars1 = new System.Windows.Forms.Label();
+            this.iLbl_Chars2 = new System.Windows.Forms.Label();
+            this.iLbl_Chars3 = new System.Windows.Forms.Label();
+            this.iLbl_Chars4 = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iLbl_Values1
+            // 
+            this.iLbl_Values1.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Values1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Values1.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Values1.Location = new System.Drawing.Point(5, 28);
+            this.iLbl_Values1.Name = "iLbl_Values1";
+            this.iLbl_Values1.Size = new System.Drawing.Size(243, 16);
+            this.iLbl_Values1.TabIndex = 1;
+            this.iLbl_Values1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Values2
+            // 
+            this.iLbl_Values2.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Values2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Values2.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Values2.Location = new System.Drawing.Point(5, 44);
+            this.iLbl_Values2.Name = "iLbl_Values2";
+            this.iLbl_Values2.Size = new System.Drawing.Size(243, 16);
+            this.iLbl_Values2.TabIndex = 1;
+            this.iLbl_Values2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Values3
+            // 
+            this.iLbl_Values3.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Values3.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Values3.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Values3.Location = new System.Drawing.Point(5, 60);
+            this.iLbl_Values3.Name = "iLbl_Values3";
+            this.iLbl_Values3.Size = new System.Drawing.Size(243, 16);
+            this.iLbl_Values3.TabIndex = 1;
+            this.iLbl_Values3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Values4
+            // 
+            this.iLbl_Values4.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Values4.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Values4.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Values4.Location = new System.Drawing.Point(5, 76);
+            this.iLbl_Values4.Name = "iLbl_Values4";
+            this.iLbl_Values4.Size = new System.Drawing.Size(243, 16);
+            this.iLbl_Values4.TabIndex = 1;
+            this.iLbl_Values4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Chars1
+            // 
+            this.iLbl_Chars1.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Chars1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Chars1.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Chars1.Location = new System.Drawing.Point(264, 28);
+            this.iLbl_Chars1.Name = "iLbl_Chars1";
+            this.iLbl_Chars1.Size = new System.Drawing.Size(120, 16);
+            this.iLbl_Chars1.TabIndex = 2;
+            this.iLbl_Chars1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Chars2
+            // 
+            this.iLbl_Chars2.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Chars2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Chars2.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Chars2.Location = new System.Drawing.Point(264, 44);
+            this.iLbl_Chars2.Name = "iLbl_Chars2";
+            this.iLbl_Chars2.Size = new System.Drawing.Size(120, 16);
+            this.iLbl_Chars2.TabIndex = 2;
+            this.iLbl_Chars2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Chars3
+            // 
+            this.iLbl_Chars3.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Chars3.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Chars3.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Chars3.Location = new System.Drawing.Point(264, 60);
+            this.iLbl_Chars3.Name = "iLbl_Chars3";
+            this.iLbl_Chars3.Size = new System.Drawing.Size(120, 16);
+            this.iLbl_Chars3.TabIndex = 2;
+            this.iLbl_Chars3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // iLbl_Chars4
+            // 
+            this.iLbl_Chars4.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Chars4.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Chars4.ForeColor = System.Drawing.Color.Black;
+            this.iLbl_Chars4.Location = new System.Drawing.Point(264, 76);
+            this.iLbl_Chars4.Name = "iLbl_Chars4";
+            this.iLbl_Chars4.Size = new System.Drawing.Size(120, 16);
+            this.iLbl_Chars4.TabIndex = 2;
+            this.iLbl_Chars4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // PopupCellAllocatedRaw
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+            this.BackColor = System.Drawing.SystemColors.Control;
+            this.ClientSize = new System.Drawing.Size(392, 120);
+            this.Controls.Add(this.iLbl_Chars1);
+            this.Controls.Add(this.iLbl_Values1);
+            this.Controls.Add(this.iLbl_Values2);
+            this.Controls.Add(this.iLbl_Values3);
+            this.Controls.Add(this.iLbl_Values4);
+            this.Controls.Add(this.iLbl_Chars2);
+            this.Controls.Add(this.iLbl_Chars3);
+            this.Controls.Add(this.iLbl_Chars4);
+            this.Name = "PopupCellAllocatedRaw";
+            this.Title = "Allocated Cell (Unknown)";
+            this.Controls.SetChildIndex(this.iLbl_Chars4, 0);
+            this.Controls.SetChildIndex(this.iLbl_Chars3, 0);
+            this.Controls.SetChildIndex(this.iLbl_Chars2, 0);
+            this.Controls.SetChildIndex(this.iLbl_Values4, 0);
+            this.Controls.SetChildIndex(this.iLbl_Values3, 0);
+            this.Controls.SetChildIndex(this.iLbl_Values2, 0);
+            this.Controls.SetChildIndex(this.iLbl_Values1, 0);
+            this.Controls.SetChildIndex(this.iLbl_Chars1, 0);
+            this.ResumeLayout(false);
+
+        }
+		#endregion
+
+        #region Internal constants
+        private const string KLabelValuesPrefix = "iLbl_Values";
+        private const string KLabelCharsPrefix = "iLbl_Chars";
+        private const int KNumberOfLabelRows = 4;
+        #endregion
+
+        #region From PopupBase
+        public override void PrepareContent( HeapCellArrayWithStatistics aCells, HeapStatistics aStats )
+        {
+            System.Diagnostics.Debug.Assert( aCells.Count == 1 );
+            //
+            try
+            {
+                HeapCell cell = aCells[ 0 ];
+                System.Diagnostics.Debug.Assert( cell.Type == HeapCell.TType.EAllocated );
+
+                int descriptorLength = 0;
+                if ( cell.IsDescriptor )
+                {
+                    descriptorLength = cell.DescriptorLength;
+
+                    string title = "[ASCII] Des. Len: [";
+                    if ( cell.IsDescriptorUnicode )
+                    {
+                        title = "[UNICD] Des. Len: [";
+                    }
+                    //
+                    this.Title = title + descriptorLength.ToString( "d6" ) + "]";
+                }
+
+                // Data values & characterised data
+                int labelNumber = 0;
+                int itemIndex = 0;
+                foreach( RawItem item in cell )
+                {
+                    // Build the names of the labels we will adjust
+                    labelNumber = ( itemIndex / KNumberOfLabelRows ) + 1;
+                    string labelNameValues = KLabelValuesPrefix + labelNumber.ToString("d1");
+                    string labelNameChars = KLabelCharsPrefix + labelNumber.ToString("d1");
+
+                    // Get the label object by name
+                    System.Windows.Forms.Label labelValues = LabelByName( labelNameValues );
+                    System.Windows.Forms.Label labelChars = LabelByName( labelNameChars );
+
+                    // Reset contents if first time we have populated the label
+                    if  ( labelValues == null || labelChars == null )
+                    {
+                        break;
+                    }
+                    else if  ( ( itemIndex % KNumberOfLabelRows == 0 ) || itemIndex == 0 )
+                    {
+                        labelValues.Text = string.Empty;
+                        labelChars.Text = string.Empty;
+                        labelValues.Visible = true;
+                        labelChars.Visible = true;
+                    }
+
+                    // Add new data to the label
+                    labelValues.Text += item.Data.ToString("x8") + " ";
+
+                    if  ( cell.IsDescriptor )
+                    {
+                        labelChars.Text += item.OriginalCharacterisedData;
+                    }
+                    else
+                    {
+                        labelChars.Text += item.CharacterisedData;
+                    }
+                    
+                    // Next item
+                    ++itemIndex;
+                }
+
+                // Reduce height of form based upon usage of labels
+                int unusedLabelHeight = iLbl_Values1.Height * ( KNumberOfLabelRows - Math.Min( KNumberOfLabelRows, labelNumber ) );
+                int formHeight = this.Height;
+                int newFormHeight = formHeight - unusedLabelHeight;
+
+                // Hide unused items
+                for( ++labelNumber; labelNumber<=KNumberOfLabelRows; labelNumber++ )
+                {
+                    // Build the names of the labels we will adjust
+                    string labelNameValues = KLabelValuesPrefix + labelNumber.ToString("d1");
+                    string labelNameChars = KLabelCharsPrefix + labelNumber.ToString("d1");
+
+                    System.Windows.Forms.Label labelValues = LabelByName( labelNameValues );
+                    labelValues.Visible = false;
+                    System.Windows.Forms.Label labelChars = LabelByName( labelNameChars );
+                    labelChars.Visible = false;
+                }
+
+                // Set final height
+                base.Height = newFormHeight;
+            }
+            finally
+            {
+                base.PrepareContent( aCells, aStats );
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        #endregion
+
+        #region Internal methods
+        private Label LabelByName( string aName )
+        {
+            Label ret = null;
+            //
+            foreach( Control ctrl in Controls )
+            {
+                if  ( ctrl is Label && ctrl.Name == aName )
+                {
+                    ret = (Label) ctrl;
+                    break;
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedRaw.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 1.3
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">1.3</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1">this is my long string</data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        [base64 mime encoded serialized .NET Framework object]
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        [base64 mime encoded string representing a byte array form of the .NET Framework object]
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used forserialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>1.3</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="iLbl_Values1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Values1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Values1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Values2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Values2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Values2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Values3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Values3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Values3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Values4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Values4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Values4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Chars1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Chars2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Chars3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars4.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Chars4.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Chars4.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>(Default)</value>
+  </data>
+  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.Name">
+    <value>PopupCellAllocatedRaw</value>
+  </data>
+  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>80</value>
+  </data>
+  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedSymbol.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,190 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Statistics;
+using HeapLib.Statistics.Tracking.Base;
+
+namespace HeapCtrlLib.Popups.Forms
+{
+	public class PopupCellAllocatedSymbols : PopupBase
+	{
+        #region Windows Form Designer data members
+        private System.ComponentModel.IContainer components = null;
+        #endregion
+
+        #region Constructors & destructor
+        public PopupCellAllocatedSymbols()
+		{
+			InitializeComponent();
+            //
+            this.SetStyle( ControlStyles.UserPaint, true );
+            this.SetStyle( ControlStyles.DoubleBuffer, true );
+            this.SetStyle( ControlStyles.AllPaintingInWmPaint, true );
+            this.SetStyle( ControlStyles.ResizeRedraw, true );
+            this.SetStyle( ControlStyles.Selectable, false );
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if( disposing )
+            {
+                if (components != null) 
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.iLbl_Description = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iLbl_Description
+            // 
+            this.iLbl_Description.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Description.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Description.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Description.Location = new System.Drawing.Point( 8, 32 );
+            this.iLbl_Description.Name = "iLbl_Description";
+            this.iLbl_Description.Size = new System.Drawing.Size( 344, 129 );
+            this.iLbl_Description.TabIndex = 4;
+            // 
+            // PopupCellAllocatedSymbols
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.BackColor = System.Drawing.SystemColors.Control;
+            this.ClientSize = new System.Drawing.Size( 360, 193 );
+            this.Controls.Add( this.iLbl_Description );
+            this.Name = "PopupCellAllocatedSymbols";
+            this.Title = "Allocated Cell (23 instances)";
+            this.Layout += new System.Windows.Forms.LayoutEventHandler( this.PopupCellAllocatedRaw_Layout );
+            this.Controls.SetChildIndex( this.iLbl_Description, 0 );
+            this.ResumeLayout( false );
+
+        }
+		#endregion
+
+        #region Internal constants
+        private const string KLabelValuesPrefix = "iLbl_Values";
+        private const string KLabelCharsPrefix = "iLbl_Chars";
+        private System.Windows.Forms.Label iLbl_Description;
+        private const int KNumberOfLabelRows = 4;
+        #endregion
+
+        #region From PopupBase
+        public override void PrepareContent( HeapCellArrayWithStatistics aCells, HeapStatistics aStats )
+        {
+            try
+            {
+                HeapCell cell = aCells[ 0 ];
+                System.Diagnostics.Debug.Assert( cell.Type == HeapCell.TType.EAllocated );
+                System.Diagnostics.Debug.Assert( cell.Symbol != null );
+                RelationshipManager relMgr = cell.RelationshipManager;
+                //
+                TrackingInfo info = aStats.StatsAllocated.TrackerSymbols[ cell.Symbol ];
+                int instCount = info.AssociatedCellCount;
+                //
+                Title = instCount + " Instance(s)";
+                //
+                StringBuilder msg = new StringBuilder();
+                //
+                msg.AppendFormat( "This allocated cell is an instance of {0} from {1}", cell.Symbol.NameWithoutVTablePrefix, cell.Symbol.ObjectWithoutSection );
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+
+                msg.AppendFormat( "There {0} {1} instance{2} of this symbol, with each instance using {3} bytes of memory (plus cell header overhead).", ( instCount == 0 || instCount > 1 ) ? "are" : "is", info.AssociatedCellCount, ( instCount == 0 || instCount > 1 ) ? "s" : string.Empty, cell.PayloadLength );
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                //
+                msg.AppendFormat( "In total, cells of this type use {0} bytes of heap memory", info.AssociatedMemory ); 
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                //
+                msg.AppendFormat( "This cell references {0} other cell(s), and is referenced by {1} cell(s)", relMgr.EmbeddedReferencesTo.Count, relMgr.ReferencedBy.Count );
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                // 
+                iLbl_Description.Text = msg.ToString();
+            }
+            finally
+            {
+                base.PrepareContent( aCells, aStats );
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void PopupCellAllocatedRaw_Layout( object sender, System.Windows.Forms.LayoutEventArgs e )
+        {
+            iLbl_Description.Bounds = base.ClientRect;
+        }
+        #endregion
+
+        #region Internal methods
+        private Label LabelByName( string aName )
+        {
+            Label ret = null;
+            //
+            foreach( Control ctrl in Controls )
+            {
+                if  ( ctrl is Label && ctrl.Name == aName )
+                {
+                    ret = (Label) ctrl;
+                    break;
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellAllocatedSymbol.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellFree.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+
+namespace HeapCtrlLib.Popups.Forms
+{
+	public class PopupCellFree : PopupBase
+	{
+        #region Windows form designer variables
+        private System.Windows.Forms.Label iLbl_Description;
+		private System.ComponentModel.IContainer components = null;
+        #endregion
+
+        #region Constructors & destructor
+		public PopupCellFree()
+		{
+			InitializeComponent();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if (components != null) 
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+        #endregion
+
+		#region Designer generated code
+		// <summary>
+		// Required method for Designer support - do not modify
+		// the contents of this method with the code editor.
+		// </summary>
+		private void InitializeComponent()
+		{
+            this.iLbl_Description = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iLbl_Description
+            // 
+            this.iLbl_Description.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Description.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Description.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Description.Location = new System.Drawing.Point( 6, 30 );
+            this.iLbl_Description.Name = "iLbl_Description";
+            this.iLbl_Description.Size = new System.Drawing.Size( 355, 105 );
+            this.iLbl_Description.TabIndex = 1;
+            // 
+            // PopupCellFree
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.ClientSize = new System.Drawing.Size( 367, 167 );
+            this.Controls.Add( this.iLbl_Description );
+            this.Name = "PopupCellFree";
+            this.Title = "Free Cell";
+            this.Layout += new System.Windows.Forms.LayoutEventHandler( this.PopupCellFree_Layout );
+            this.Controls.SetChildIndex( this.iLbl_Description, 0 );
+            this.ResumeLayout( false );
+
+        }
+		#endregion
+
+        #region From PopupBase
+        public override void PrepareContent( HeapCellArrayWithStatistics aCells, HeapStatistics aStats )
+        {
+            try
+            {
+                HeapCell cell = aCells[ 0 ];
+                System.Diagnostics.Debug.Assert( cell.Type == HeapCell.TType.EFree );
+                //
+                StringBuilder msg = new StringBuilder();
+                //
+                msg.AppendFormat( "This free cell has a {0} byte header and a is occupying a total of {1} byte(s) of heap space.", cell.HeaderSize, cell.Length );
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                //
+                msg.AppendFormat( "In total, this heap contains {0} bytes of free space.", aStats.StatsFree.TypeSize );
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                //
+                if ( cell.Symbol != null )
+                {
+                    // Free cells can contain symbols if we attempt to decode them...
+                    msg.AppendFormat( "The free cell may have originally been of type \"{0}.\"", cell.SymbolString );
+                    msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                }
+                // 
+                iLbl_Description.Text = msg.ToString();
+            }
+            finally
+            {
+                base.PrepareContent( aCells, aStats );
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void PopupCellFree_Layout(object sender, System.Windows.Forms.LayoutEventArgs e)
+        {
+            iLbl_Description.Bounds = base.ClientRect;
+        }
+        #endregion
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellFree.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellRelationshipInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,185 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Runtime.InteropServices;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Statistics;
+using HeapLib.Statistics.Tracking.Base;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Popups.Forms
+{
+	public class PopupCellRelationshipInfo : PopupBase
+	{
+        #region Windows Form Designer data members
+        private System.ComponentModel.IContainer components = null;
+        #endregion
+
+        #region Constructors & destructor
+        public PopupCellRelationshipInfo()
+		{
+			InitializeComponent();
+            //
+            this.SetStyle( ControlStyles.UserPaint, true );
+            this.SetStyle( ControlStyles.DoubleBuffer, true );
+            this.SetStyle( ControlStyles.AllPaintingInWmPaint, true );
+            this.SetStyle( ControlStyles.ResizeRedraw, true );
+            this.SetStyle( ControlStyles.Selectable, false );
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if( disposing )
+            {
+                if (components != null) 
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.iLbl_Description = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iLbl_Description
+            // 
+            this.iLbl_Description.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iLbl_Description.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Description.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iLbl_Description.Location = new System.Drawing.Point( 8, 32 );
+            this.iLbl_Description.Name = "iLbl_Description";
+            this.iLbl_Description.Size = new System.Drawing.Size( 344, 129 );
+            this.iLbl_Description.TabIndex = 4;
+            // 
+            // PopupCellAllocatedSymbols
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.BackColor = System.Drawing.SystemColors.Control;
+            this.ClientSize = new System.Drawing.Size( 360, 193 );
+            this.Controls.Add( this.iLbl_Description );
+            this.Name = "PopupCellRelationshipInfo";
+            this.Title = "Allocated Cell (23 instances)";
+            this.Layout += new System.Windows.Forms.LayoutEventHandler( this.PopupCellAllocatedRaw_Layout );
+            this.Controls.SetChildIndex( this.iLbl_Description, 0 );
+            this.ResumeLayout( false );
+
+        }
+		#endregion
+
+        #region Internal constants
+        private const string KLabelValuesPrefix = "iLbl_Values";
+        private const string KLabelCharsPrefix = "iLbl_Chars";
+        private System.Windows.Forms.Label iLbl_Description;
+        private const int KNumberOfLabelRows = 4;
+        #endregion
+
+        #region From PopupBase
+        public override void PrepareContent( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, RawItem aRawItem )
+        {
+            try
+            {
+                System.Diagnostics.Debug.Assert( aCells.Count == 1 );
+                System.Diagnostics.Debug.Assert( aRawItem.Tag != null && aRawItem.Tag is RelationshipInfo );
+                HeapCell cell = aCells[ 0 ];
+                RelationshipManager relMgr = cell.RelationshipManager;
+                RelationshipInfo relInfo = (RelationshipInfo) aRawItem.Tag;
+                //
+                StringBuilder msg = new StringBuilder();
+                //
+                msg.AppendFormat( "This is an embedded reference to the cell at address 0x{0}", relInfo.ToCell.Address.ToString("x8") );
+                if ( relInfo.ToCell.Symbol != null )
+                {
+                    msg.AppendFormat( ", which is an instance of a {0} object.", relInfo.ToCell.SymbolString );
+                }
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                //
+                msg.AppendFormat( "In total, this cell references {0} other cell(s), and is referenced by {1} cell(s)", relMgr.EmbeddedReferencesTo.Count, relMgr.ReferencedBy.Count );
+                msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+                // 
+                iLbl_Description.Text = msg.ToString();
+            }
+            finally
+            {
+                base.PrepareContent( aCells, aStats, aRawItem );
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void PopupCellAllocatedRaw_Layout( object sender, System.Windows.Forms.LayoutEventArgs e )
+        {
+            iLbl_Description.Bounds = base.ClientRect;
+        }
+        #endregion
+
+        #region Internal methods
+        private Label LabelByName( string aName )
+        {
+            Label ret = null;
+            //
+            foreach( Control ctrl in Controls )
+            {
+                if  ( ctrl is Label && ctrl.Name == aName )
+                {
+                    ret = (Label) ctrl;
+                    break;
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupCellRelationshipInfo.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupMultiCellSelection.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,179 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+
+namespace HeapCtrlLib.Popups.Forms
+{
+	public class PopupMultiCellSelection : PopupBase
+	{
+        #region Windows form designer variables
+        private System.Windows.Forms.Label iLbl_Description;
+		private System.ComponentModel.IContainer components = null;
+        #endregion
+
+        #region Constructors & destructor
+		public PopupMultiCellSelection()
+		{
+			InitializeComponent();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if (components != null) 
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+        #endregion
+
+		#region Designer generated code
+		private void InitializeComponent()
+		{
+            this.iLbl_Description = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iLbl_Description
+            // 
+            this.iLbl_Description.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+                | System.Windows.Forms.AnchorStyles.Left) 
+                | System.Windows.Forms.AnchorStyles.Right)));
+            this.iLbl_Description.BackColor = System.Drawing.Color.Transparent;
+            this.iLbl_Description.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+            this.iLbl_Description.Location = new System.Drawing.Point(6, 30);
+            this.iLbl_Description.Name = "iLbl_Description";
+            this.iLbl_Description.Size = new System.Drawing.Size(372, 130);
+            this.iLbl_Description.TabIndex = 1;
+            // 
+            // PopupMultiCellSelection
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+            this.ClientSize = new System.Drawing.Size(384, 192);
+            this.Controls.Add(this.iLbl_Description);
+            this.Name = "PopupMultiCellSelection";
+            this.Title = "2 Cells Selected";
+            this.Layout += new System.Windows.Forms.LayoutEventHandler(this.PopupCellFree_Layout);
+            this.Controls.SetChildIndex(this.iLbl_Description, 0);
+            this.ResumeLayout(false);
+
+        }
+		#endregion
+
+        #region From PopupBase
+        public override void PrepareContent( HeapCellArrayWithStatistics aCells, HeapStatistics aStats )
+        {
+            try
+            {
+                Title = aCells.Count + " Cells Selected";
+
+                StringBuilder msg = new StringBuilder();
+                //
+                if  ( aCells.Statistics.StatsAllocated.TypeCount > 0 )
+                {
+                    msg.AppendFormat( "Selection contains {0} allocated cell{1}", aCells.Statistics.StatsAllocated.TypeCount, (aCells.Statistics.StatsAllocated.TypeCount == 1) ? string.Empty : "s" );
+                    if  ( aCells.Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount > 0 )
+                    {
+                        msg.AppendFormat( ", {0} descriptor{1}", aCells.Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount, ( aCells.Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount == 1 ) ? string.Empty : "s" );
+                    }
+
+                    if  ( aCells.Statistics.StatsAllocated.TrackerSymbols.Count > 0 )
+                    {
+                        msg.AppendFormat( " and {0} symbol instance{1}", aCells.Statistics.StatsAllocated.TrackerSymbols.Count, (aCells.Statistics.StatsAllocated.TrackerSymbols.Count == 1) ? string.Empty : "s" );
+                        msg.AppendFormat( " from {0} different object{1}", aCells.Statistics.StatsAllocated.TrackerObjects.Count, (aCells.Statistics.StatsAllocated.TrackerObjects.Count == 1) ? string.Empty : "s" );
+                    }
+                    msg.Append( "." );
+                    msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+
+                    if  ( aCells.Statistics.StatsAllocated.CellSmallest != null )
+                    {
+                        msg.AppendFormat( "The smallest allocated cell is {0} bytes long. ", aCells.Statistics.StatsAllocated.CellSmallest.Length );
+                    }
+                    if  ( aCells.Statistics.StatsAllocated.CellLargest != null && ( aCells.Statistics.StatsAllocated.CellSmallest.Address != aCells.Statistics.StatsAllocated.CellLargest.Address ) )
+                    {
+                        msg.AppendFormat( "The largest allocated cell is {0} bytes long. ", aCells.Statistics.StatsAllocated.CellLargest.Length );
+                    }
+ 
+                    msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+
+                    
+                }
+                if  ( aCells.Statistics.StatsFree.TypeCount > 0 )
+                {
+                    msg.AppendFormat( "Selection contains {0} free cell{1}", aCells.Statistics.StatsFree.TypeCount, (aCells.Statistics.StatsFree.TypeCount == 1) ? string.Empty : "s" );
+                    msg.Append( "." );
+                    msg.Append( System.Environment.NewLine + System.Environment.NewLine );
+
+                    if  ( aCells.Statistics.StatsFree.CellSmallest != null )
+                    {
+                        msg.AppendFormat( "The smallest free cell is {0} bytes long. ", aCells.Statistics.StatsFree.CellSmallest.Length );
+                    }
+                    if  ( aCells.Statistics.StatsFree.CellLargest != null && ( aCells.Statistics.StatsFree.CellSmallest.Address != aCells.Statistics.StatsFree.CellLargest.Address ) )
+                    {
+                        msg.AppendFormat( "The largest free cell is {0} bytes long. ", aCells.Statistics.StatsFree.CellLargest.Length );
+                    }
+                }
+
+                iLbl_Description.Text = msg.ToString();
+            }
+            finally
+            {
+                base.PrepareContent( aCells, aStats );
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void PopupCellFree_Layout(object sender, System.Windows.Forms.LayoutEventArgs e)
+        {
+            iLbl_Description.Bounds = base.ClientRect;
+        }
+        #endregion
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Forms/PopupMultiCellSelection.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 1.3
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">1.3</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1">this is my long string</data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        [base64 mime encoded serialized .NET Framework object]
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        [base64 mime encoded string representing a byte array form of the .NET Framework object]
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used forserialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>1.3</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="iLbl_Description.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iLbl_Description.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iLbl_Description.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.Name">
+    <value>PopupMultiCellSelection</value>
+  </data>
+  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>(Default)</value>
+  </data>
+  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>80</value>
+  </data>
+  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerBase.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Forms;
+using HeapLib.Array;
+using HeapLib.Cells;
+using HeapLib.Statistics;
+using SymbianUtils.RawItems;
+using SymbianUtils.Graphics;
+
+namespace HeapCtrlLib.Popups.Managers
+{
+	internal abstract class PopupManagerBase : IHeapCellPopupManager
+	{
+        #region Constructors & destructor
+		public PopupManagerBase()
+		{
+        }
+        #endregion
+
+        #region New framework
+        public virtual bool SupportsRawItemInfoImpl
+        {
+            get { return false; }
+        }
+
+        public virtual void PopupShowAsyncImpl( HeapCell aCell, RawItem aItem, HeapStatistics aStats, Point aLocalControlCoordiantes, Point aScreenCoordinates, Size aOffsetBy, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+        }
+
+        public abstract void PopupShowAsyncImpl( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordinates, Point aScreenCoordinates, Size aOffsetBy, System.Windows.Forms.KeyEventHandler aKeyHandler );
+        #endregion
+
+        #region IHeapCellPopupManager Members
+        public bool Visible
+        {
+            get { return ( iActivePopup != null && iActivePopup.Visible ); }
+        }
+
+        public PopupBase Popup
+        {
+            get { return iActivePopup; }
+        }
+
+        public bool SupportsRawItemInfo
+        {
+            get { return SupportsRawItemInfoImpl; }
+        }
+
+        public void PopupHide()
+        {
+            lock( this )
+            {
+                if  ( iActivePopup != null )
+                {
+                    iActivePopup.PopupHide();
+                    iActivePopup.Dispose();
+                    iActivePopup = null;
+                }
+            }
+        }
+
+        public void PopupShowAsync( HeapCell aCell, RawItem aItem, HeapStatistics aStats, Point aLocalControlCoordinates, Point aScreenCoordinates, Size aOffsetBy, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+            if ( SupportsRawItemInfo )
+            {
+                lock ( this )
+                {
+                    PopupShowAsyncImpl( aCell, aItem, aStats, aLocalControlCoordinates, aScreenCoordinates, aOffsetBy, aKeyHandler );
+                }
+            }
+        }
+
+        public void PopupShowAsync( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordinates, Point aScreenCoordinates, Size aOffsetBy, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+            lock ( this )
+            {
+                PopupShowAsyncImpl( aCells, aStats, aLocalControlCoordinates, aScreenCoordinates, aOffsetBy, aKeyHandler );
+            }
+        }
+
+        public void PopupRelocate( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordiantes, Point aScreenCoordinates, Size aOffsetBy )
+        {
+            if  ( iActivePopup != null && Visible )
+            {
+                lock( this )
+                {
+                    iActivePopup.PopupRelocate( aScreenCoordinates, aCells, aStats, aOffsetBy );
+                }
+            }
+        }
+        #endregion
+
+        #region Data members
+        protected PopupBase iActivePopup = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerByAge.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Forms;
+using HeapLib.Array;
+using HeapLib.Cells;
+using HeapLib.Relationships;
+using HeapLib.Statistics;
+using SymbianUtils.Graphics;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Popups.Managers
+{
+    internal class PopupManagerByAge : PopupManagerBase
+    {
+        #region Constructors & destructor
+        public PopupManagerByAge()
+        {
+        }
+        #endregion
+
+        #region IHeapCellPopupManager Members
+        public override void PopupShowAsyncImpl( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordinates, Point aScreenCoordinates, Size aOffsetBy, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+            PopupHide();
+            //
+            if  ( aCells.Count == 1 )
+            {
+                HeapCell cell = aCells[ 0 ];
+                //
+                switch( cell.Type )
+                {
+                    default:
+                    case HeapCell.TType.EAllocated:
+                        if  ( cell.Symbol != null )
+                        {
+                            iActivePopup = new PopupCellAllocatedSymbols();
+                        }
+                        else
+                        {
+                            iActivePopup = new PopupCellAllocatedRaw();
+                        }
+                        break;
+                    case HeapCell.TType.EFree:
+                        iActivePopup = new PopupCellFree();
+                        break;
+                }
+            }
+            else if ( aCells.Count > 1 )
+            {
+                iActivePopup = new PopupMultiCellSelection();
+                iActivePopup.VisibilityDelay = 0;
+            }
+            //
+            iActivePopup.PopupShowAsync( aScreenCoordinates, aCells, aStats, aOffsetBy, aKeyHandler );
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerByEmbeddedReferences.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Forms;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Statistics;
+using SymbianUtils.Graphics;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Popups.Managers
+{
+    internal class PopupManagerByEmbeddedReferences : PopupManagerBySymbol
+	{
+        #region Constructors & destructor
+        public PopupManagerByEmbeddedReferences()
+		{
+        }
+        #endregion
+
+        #region IHeapCellPopupManager Members
+        public override bool SupportsRawItemInfoImpl
+        {
+            get { return true; }
+        }
+        
+        public override void PopupShowAsyncImpl( HeapCell aCell, RawItem aItem, HeapStatistics aStats, Point aLocalControlCoordiantes, Point aScreenCoordinates, Size aOffsetBy, KeyEventHandler aKeyHandler )
+        {
+            PopupHide();
+            //
+            System.Diagnostics.Debug.Assert( aItem.Tag != null && aItem.Tag is RelationshipInfo );
+            //
+            iActivePopup = new PopupCellRelationshipInfo();
+            iActivePopup.ColourFromHoverCoordinate = true;
+            iActivePopup.PopupShowAsync( aScreenCoordinates, aCell, aItem, aStats, aOffsetBy, aKeyHandler );
+        }
+
+        public override void PopupShowAsyncImpl( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordinates, Point aScreenCoordinates, Size aCellBoxSizeIncludingPadding, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+            base.PopupShowAsyncImpl( aCells, aStats, aLocalControlCoordinates, aScreenCoordinates, aCellBoxSizeIncludingPadding, aKeyHandler );
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Popups/Managers/PopupManagerBySymbol.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Popups.Forms;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Statistics;
+using SymbianUtils.Graphics;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Popups.Managers
+{
+	internal class PopupManagerBySymbol : PopupManagerBase
+	{
+        #region Constructors & destructor
+		public PopupManagerBySymbol()
+		{
+        }
+        #endregion
+
+        #region IHeapCellPopupManager Members
+        public override void PopupShowAsyncImpl( HeapCellArrayWithStatistics aCells, HeapStatistics aStats, Point aLocalControlCoordinates, Point aScreenCoordinates, Size aCellBoxSizeIncludingPadding, System.Windows.Forms.KeyEventHandler aKeyHandler )
+        {
+            PopupHide();
+            //
+            if  ( aCells.Count == 1 )
+            {
+                HeapCell cell = aCells[ 0 ];
+                
+                // If there's a free cell with a symbol (possible, if the user wanted to decode free cell contents)
+                // then we should just display the allocated symbol popup (even though it's a free cell!)
+                if ( cell.Symbol != null )
+                {
+                    if ( cell.Type == HeapCell.TType.EFree )
+                    {
+                        int x = 0;
+                        x++;
+                    }
+                    iActivePopup = new PopupCellAllocatedSymbols();
+                }
+                else if ( cell.Type == HeapCell.TType.EAllocated )
+                {
+                    iActivePopup = new PopupCellAllocatedRaw();
+                }
+                else if ( cell.Type == HeapCell.TType.EFree )
+                {
+                    iActivePopup = new PopupCellFree();
+                }
+
+                iActivePopup.ColourFromHoverCoordinate = true;
+            }
+            else if ( aCells.Count > 1 )
+            {
+                iActivePopup = new PopupMultiCellSelection();
+                iActivePopup.VisibilityDelay = 0;
+            }
+            //
+            iActivePopup.PopupShowAsync( aScreenCoordinates, aCells, aStats, aCellBoxSizeIncludingPadding, aKeyHandler );
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/ContentBorders/HeapCellRendererContentBorder.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapLib;
+using HeapLib.Array;
+using HeapLib.Cells;
+using HeapLib.Reconstructor;
+
+namespace HeapCtrlLib.Renderers.ContentBorders
+{
+	internal class HeapCellRendererContentBorder : HeapCellRendererColour, IHeapCellRendererContentBorder
+	{
+        #region Constructors & destructor
+        public HeapCellRendererContentBorder()
+		{
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        #endregion
+
+        #region From IHeapCellRendererContentBorder
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContentBorder( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            SymRect rect = new SymRect( aPosition, aBoxSize + aPaddingSize );
+
+            if ( aMetaData.Borders[ THeapCellBorderType.ELeft ] ) // Draw left-hand outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.TopLeft, rect.BottomLeft );
+            }
+            if  (  aMetaData.Borders[ THeapCellBorderType.ERight ] ) // Draw right-hand outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.TopRight, rect.BottomRight );
+            }
+            if  (  aMetaData.Borders[ THeapCellBorderType.ETop ] ) // Draw top-side outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.TopLeft, rect.TopRight );
+            }
+            if  (  aMetaData.Borders[ THeapCellBorderType.EBottom ] ) // Draw bottom-side outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.BottomLeft, rect.BottomRight );
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/ContentBorders/HeapCellRendererContentBorder3d.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using SymbianUtils.Colour;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapLib;
+using HeapLib.Array;
+using HeapLib.Cells;
+using HeapLib.Reconstructor;
+
+namespace HeapCtrlLib.Renderers.ContentBorders
+{
+	internal class HeapCellRendererContentBorder3d : HeapCellRendererColour, IHeapCellRendererContentBorder
+	{
+        #region Constructors & destructor
+        public HeapCellRendererContentBorder3d()
+		{
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        #endregion
+
+        #region From IHeapCellRendererContentBorder
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContentBorder( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            SymRect rect = new SymRect( aPosition, aBoxSize + aPaddingSize );
+
+            // Right and bottom get darker borders
+            Color rightAndBottomColour = ColourUtils.Darken( aMetaData.CellBoxColor, 0.15f );
+            using ( Pen rightAndBottomPen = new Pen( rightAndBottomColour ) )
+            {
+                if ( aMetaData.Borders[ THeapCellBorderType.ERight ] ) // Draw right-hand outline
+                {
+                    Point start = rect.TopRight;
+                    Point end = rect.BottomRight;
+                    start.Offset( -1, 0 );
+                    end.Offset( -1, 0 );
+                    //
+                    aGraphics.DrawLine( rightAndBottomPen, start, end );
+                }
+                if ( aMetaData.Borders[ THeapCellBorderType.EBottom ] ) // Draw bottom-side outline
+                {
+                    Point start = rect.BottomLeft;
+                    Point end = rect.BottomRight;
+                    start.Offset( 0, -1 );
+                    end.Offset( 0, -1 );
+                    //
+                    aGraphics.DrawLine( rightAndBottomPen, start, end );
+                }
+            }
+
+            // Left and Top get lighter borders
+            Color leftAndTopColour = ColourUtils.Lighten( aMetaData.CellBoxColor, 0.15f );
+            using ( Pen leftAndTopPen = new Pen( leftAndTopColour ) )
+            {
+                if ( aMetaData.Borders[ THeapCellBorderType.ELeft ] ) // Draw left-hand outline
+                {
+                    Point start = rect.TopLeft;
+                    Point end = rect.BottomLeft;
+                    start.Offset( 1, 0 );
+                    end.Offset( 1, 0 );
+                    //
+                    aGraphics.DrawLine( leftAndTopPen, start, end );
+                }
+                if ( aMetaData.Borders[ THeapCellBorderType.ETop ] ) // Draw top-side outline
+                {
+                    Point start = rect.TopLeft;
+                    Point end = rect.TopRight;
+                    start.Offset( 0, 1 );
+                    end.Offset( 0, 1 );
+                    //
+                    aGraphics.DrawLine( leftAndTopPen, start, end );
+                }
+            }
+
+            // Now draw black border which will cover any over-spill from above.
+            if ( aMetaData.Borders[ THeapCellBorderType.ELeft ] ) // Draw left-hand outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.TopLeft, rect.BottomLeft );
+            }
+            if ( aMetaData.Borders[ THeapCellBorderType.ERight ] ) // Draw right-hand outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.TopRight, rect.BottomRight );
+            }
+            if ( aMetaData.Borders[ THeapCellBorderType.ETop ] ) // Draw top-side outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.TopLeft, rect.TopRight );
+            }
+            if ( aMetaData.Borders[ THeapCellBorderType.EBottom ] ) // Draw bottom-side outline
+            {
+                aGraphics.DrawLine( Pens.Black, rect.BottomLeft, rect.BottomRight );
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/ContentBorders/HeapCellRendererContentBorderFloating.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapLib;
+using HeapLib.Array;
+using HeapLib.Cells;
+using HeapLib.Reconstructor;
+
+namespace HeapCtrlLib.Renderers.ContentBorders
+{
+	internal class HeapCellRendererContentBorderFloating : HeapCellRendererColour, IHeapCellRendererContentBorder
+	{
+        #region Constructors & destructor
+        public HeapCellRendererContentBorderFloating()
+		{
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        #endregion
+
+        #region From IHeapCellRendererContentBorder
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContentBorder( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+            aGraphics.DrawRectangle( Pens.Black, boxRect.Rectangle );
+
+            // If we're drawing the header, we can decorate the header with an 
+            // additional line.
+            HeapCell.TRegion region = aCell.RegionForAddress( aAddress );
+            if ( region == HeapCell.TRegion.EHeader )
+            {
+                Point linePosStart = boxRect.TopLeft;
+                linePosStart.X += KHeaderBoxLineCornerOffset;
+                Point linePosEnd = boxRect.TopLeft;
+                linePosEnd.Y += KHeaderBoxLineCornerOffset;
+                //
+                aGraphics.DrawLine( Pens.Black, linePosStart, linePosEnd );
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Internal constants
+        private const int KHeaderBoxLineCornerOffset = 5;
+        #endregion
+
+        #region Data members
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/Bases/HeapCellRendererByColour.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapLib;
+using SymbianUtils.Colour;
+using HeapCtrlLib.Renderers.Utilities;
+
+namespace HeapCtrlLib.Renderers.Contents.Bases
+{
+    public class HeapCellRendererByColour : HeapCellRendererWithText
+    {
+        #region Constructors & destructor
+        public HeapCellRendererByColour()
+        {
+            // Add a few extra banned colours that are specific to this app
+            iColorUtil.BannedColors.Add( HeapCellRendererColour.KCellAllocatedDescriptor );
+            iColorUtil.BannedColors.Add( HeapCellRendererColour.KCellAllocatedUnknown );
+            iColorUtil.BannedColors.Add( HeapCellRendererColour.KCellAllocatedWithSymbol );
+            iColorUtil.BannedColors.Add( HeapCellRendererColour.KCellFree );
+        }
+        #endregion
+
+        #region API
+        protected Color GenerateRandomColour( Random aRandomNumberGenerator )
+        {
+            return iColorUtil.GenerateRandomColour( aRandomNumberGenerator );
+        }
+        #endregion
+
+        #region Internal methods
+        protected List<KnownColor> StandardColours
+        {
+            get
+            {
+                return iColorUtil.CreateStandardColors();
+            }
+        }
+
+        protected List<KnownColor> BannedColours
+        {
+            get
+            {
+                return iColorUtil.CreateBannedColors();
+            }
+        }
+        #endregion
+
+        #region Data members
+        private ColourGenerationUtil iColorUtil = new ColourGenerationUtil();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/Bases/HeapCellRendererWithText.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,128 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using HeapLib;
+using SymbianUtils.Colour;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers.Utilities;
+
+namespace HeapCtrlLib.Renderers.Contents.Bases
+{
+    public class HeapCellRendererWithText : HeapCellRendererColour 
+    {
+        #region Constructors & destructor
+        public HeapCellRendererWithText()
+        {
+        }
+        #endregion
+        
+        #region Constants
+        private const float KSymbolFontSizeInitial = 9.0f;
+        private const float KSymbolFontSizeMinimum = 6.0f;
+        private const float KSymbolFontSizeDecrement = 0.5f;
+        private const string KSymbolFontName = "Tahoma";
+        #endregion
+
+        #region Protected properties
+        protected HeapCellLargestRectangleCalculator RectangleCalculator
+        {
+            get { return iLargestRectangleCalculator; }
+        }
+        #endregion
+
+        #region Protected drawing utilities
+        protected void PaintBoxedTextWithLuminanceHandling( string aText, Graphics aGraphics, Color aBackgroundBaselineColour )
+        {
+            SymRect rectangle = new SymRect( iLargestRectangleCalculator.Rectangle );
+            PaintBoxedTextWithLuminanceHandling( aText, aGraphics, aBackgroundBaselineColour, rectangle );
+        }
+
+        protected void PaintBoxedTextWithLuminanceHandling( string aText, Graphics aGraphics, Color aBackgroundBaselineColour, SymRect aRectangle )
+        {
+            Color textCol = Color.Black;
+            if ( aBackgroundBaselineColour.GetBrightness() < 0.4 )
+            {
+                textCol = Color.White;
+            }
+            //
+            PaintBoxedText( aText, aGraphics, textCol, aRectangle );
+        }
+
+        protected void PaintBoxedText( string aText, Graphics aGraphics, Color aTextColor )
+        {
+            SymRect rectangle = new SymRect( iLargestRectangleCalculator.Rectangle );
+            PaintBoxedText( aText, aGraphics, aTextColor, rectangle );
+        }
+
+        protected void PaintBoxedText( string aText, Graphics aGraphics, Color aTextColor, SymRect aRectangle )
+        {
+            using( StringFormat stringFormat = new StringFormat() )
+            {
+                stringFormat.Alignment = StringAlignment.Center;
+                stringFormat.LineAlignment = StringAlignment.Center;
+
+                for( float fontSize = KSymbolFontSizeInitial; fontSize >= KSymbolFontSizeMinimum; fontSize -= KSymbolFontSizeDecrement )
+                {
+                    using( System.Drawing.Font font = new Font( KSymbolFontName, fontSize, FontStyle.Bold ) )
+                    {
+                        SizeF renderSizeF = aGraphics.MeasureString( aText, font, aRectangle.Width, stringFormat );
+                        Size renderSize = new Size( (int) renderSizeF.Width, (int) renderSizeF.Height );
+                        //
+                        if ( renderSize.Width <= aRectangle.Width && renderSize.Height <= aRectangle.Height )
+                        {
+                            using( SolidBrush brush = new SolidBrush( aTextColor ) )
+                            {
+                                aGraphics.DrawString( aText, font, brush, aRectangle.Rectangle, stringFormat );
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region Data members
+        protected HeapCellLargestRectangleCalculator iLargestRectangleCalculator;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByAge.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,146 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using SymbianUtils.Graphics;
+using SymbianUtils.Colour;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Contents.Bases;
+
+namespace HeapCtrlLib.Renderers.Contents
+{
+    internal class HeapCellRendererColourByAge : HeapCellRendererByColour, IHeapCellRendererContent 
+    {
+        #region Constructors & destructor
+        public HeapCellRendererColourByAge()
+        {
+        }
+        #endregion
+
+        #region From IHeapCellRendererContent
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+            if  ( aReconstructor != null )
+            {
+                iHighestCellAllocationNumber = aReconstructor.Statistics.StatsAllocated.CellAllocationNumberLargest.AllocationNumber;
+            }
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+            iLargestRectangleCalculator = new HeapCellLargestRectangleCalculator( aNavigator );
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+            Color fillColour = CellColour( aCell );
+            //
+            string text = aCell.SymbolStringWithoutDescriptorPrefix;
+            PaintBoxedTextWithLuminanceHandling( text, aGraphics, fillColour );
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            // Get the cell colour that is associated with the cell symbol object type. This
+            // makes oldest cells very light and youngest cells very dark. We really want
+            // it the other way around...
+            aMetaData.CellBoxColor = CellColour( aCell );
+
+            // Draw actual cell
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+
+            using ( SolidBrush brush = new SolidBrush( aMetaData.CellBoxColor ) )
+            {
+                aGraphics.FillRectangle( brush, boxRect.Rectangle );
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return false; }
+        }
+
+        public void SetupFilters()
+        {
+        }
+        #endregion
+
+        #region Internal methods
+        public Color CellColour( HeapCell aCell )
+        {
+            Color fillColour = Color.LightGray;
+            //
+            if  ( aCell.Type == HeapCell.TType.EAllocated )
+            {
+                // Get the cell colour that is associated with the cell symbol object type. This
+                // makes oldest cells very light and youngest cells very dark. We really want
+                // it the other way around...
+                //
+                float maxBrightness = KRampBaselineColour.GetBrightness();
+                float allocationNumberPercentage = ((float) aCell.AllocationNumber / (float) iHighestCellAllocationNumber );
+                float targetBrightness = allocationNumberPercentage * maxBrightness;
+                float amountToDarkenBy = maxBrightness - targetBrightness;
+                fillColour = ColourUtils.Darken( KRampBaselineColour, amountToDarkenBy );
+            }
+            //
+            return fillColour;
+        }
+        #endregion
+
+        #region Internal constants
+        private Color KRampBaselineColour = Color.LightBlue;
+        #endregion
+
+        #region Data members
+        private uint iHighestCellAllocationNumber = 0;
+        private Hashtable iColourHashes = new Hashtable();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByCellType.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapCtrlLib.Renderers.Contents.Bases;
+
+namespace HeapCtrlLib.Renderers.Contents
+{
+    internal class HeapCellRendererColourByCellType : HeapCellRendererColour, IHeapCellRendererContent 
+	{
+        #region Constructors & destructor
+		public HeapCellRendererColourByCellType()
+		{
+        }
+        #endregion
+
+        #region From IHeapCellRendererContent
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            // Get the cell colour to use and also the region associated with
+            // the cell address.
+            HeapCell.TRegion region;
+            aMetaData.CellBoxColor = RampedCellFillColourByRegion( aCell, aMetaData.CellBoxCount, aAddress, out region );
+
+            // Draw actual cell
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+
+            using ( SolidBrush brush = new SolidBrush( aMetaData.CellBoxColor ) )
+            {
+                aGraphics.FillRectangle( brush, boxRect.Rectangle );
+            }
+            using( Pen borderPen = new Pen( Color.Black ) )
+            {
+                aGraphics.DrawRectangle( borderPen, boxRect.Rectangle );
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return false; }
+        }
+
+        public void SetupFilters()
+        {
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByEmbeddedReferences.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,221 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Contents.Bases;
+using SymbianUtils.Colour;
+using SymbianUtils.Graphics;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Renderers.Contents
+{
+    internal class HeapCellRendererColourByEmbeddedReferences : HeapCellRendererByColour, IHeapCellRendererContent 
+    {
+        #region Constructors & destructor
+        public HeapCellRendererColourByEmbeddedReferences()
+        {
+        }
+        #endregion
+
+        #region From IHeapCellRendererContent
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+            if  ( aReconstructor != null )
+            {
+                int min = aReconstructor.Statistics.StatsAllocated.CellNumberOfEmbeddedReferencesLeast.RelationshipManager.EmbeddedReferencesTo.Count + 1;
+                double logMin = Math.Log( (double) min );
+                //
+                int max = aReconstructor.Statistics.StatsAllocated.CellNumberOfEmbeddedReferencesMost.RelationshipManager.EmbeddedReferencesTo.Count + 1;
+                double logMax = Math.Log( (double) max );
+
+                iDomain = (float) ( logMax - logMin ); 
+            }
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+            iLargestRectangleCalculator = new HeapCellLargestRectangleCalculator( aNavigator, 1 /* skip first box, start at 2nd box which has index 1 */ );
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+            Color fillColour = ColourForHeapCell( aCell );
+            //
+            string text = aCell.SymbolStringWithoutDescriptorPrefix;
+            PaintBoxedTextWithLuminanceHandling( text, aGraphics, fillColour );
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            // Get the cell colour that is associated with the cell symbol object type
+            aMetaData.CellBoxColor = ColourForHeapCell( aCell );
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+
+            // Draw actual cell
+            using ( SolidBrush brush = new SolidBrush( aMetaData.CellBoxColor ) )
+            {
+                aGraphics.FillRectangle( brush, boxRect.Rectangle );
+            }
+
+            HeapCell.TRegion region = aMetaData.Region;
+            if ( region == HeapCell.TRegion.EHeader && aMetaData.CellBoxIndex == 0 )
+            {
+                // If first box, we show the number of inwards links to the cell
+                boxRect.Inflate( KShrinkSize, KShrinkSize );
+
+                // Draw the fill
+                Color lightenColor = ColourUtils.Lighten( aMetaData.CellBoxColor );
+                using ( SolidBrush brush = new SolidBrush( lightenColor ) )
+                {
+                    aGraphics.FillRectangle( brush, boxRect.Rectangle );
+                }
+                lightenColor = ColourUtils.Lighten( lightenColor );
+                using ( Pen borderPen = new Pen( lightenColor, KHeaderBoxWidth ) )
+                {
+                    aGraphics.DrawRectangle( borderPen, boxRect.Rectangle );
+                }
+
+                // Draw the count
+                PaintBoxedTextWithLuminanceHandling( aCell.RelationshipManager.EmbeddedReferencesTo.Count.ToString(), aGraphics, Color.Black, boxRect );
+            }
+            else
+            {
+                // If we're in the payload section, then get the raw item corresponding to the address we are drawing
+                RawItem rawItem = aMetaData.RawItem;
+                if ( rawItem != null && rawItem.Tag != null && rawItem.Tag is HeapLib.Relationships.RelationshipInfo )
+                {
+                    RelationshipInfo relInfo = (RelationshipInfo) rawItem.Tag;
+
+                    // Make the box a bit smaller
+                    boxRect.Inflate( KShrinkSize, KShrinkSize );
+
+                    // Draw the fill
+                    Color lightenColor = ColourUtils.Lighten( aMetaData.CellBoxColor );
+                    using ( SolidBrush brush = new SolidBrush( lightenColor ) )
+                    {
+                        aGraphics.FillRectangle( brush, boxRect.Rectangle );
+                    }
+                    lightenColor = ColourUtils.Lighten( lightenColor );
+                    using ( Pen borderPen = new Pen( lightenColor, KHeaderBoxWidth ) )
+                    {
+                        aGraphics.DrawRectangle( borderPen, boxRect.Rectangle );
+  
+                        // If it's a clean reference, then draw a diagonal line to decorate the box reference
+                        if ( relInfo.IsCleanLink )
+                        {
+                            Point linePosStart = boxRect.TopLeft;
+                            linePosStart.X += KHeaderBoxLineCornerOffset;
+                            Point linePosEnd = boxRect.TopLeft;
+                            linePosEnd.Y += KHeaderBoxLineCornerOffset;
+                            //
+                            aGraphics.DrawLine( borderPen, linePosStart, linePosEnd );
+                        }
+                   }
+                }
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return false; }
+        }
+
+        public void SetupFilters()
+        {
+        }
+        #endregion
+
+        #region Internal methods
+        private Color ColourForHeapCell( HeapCell aCell )
+        {
+            Color ret = KBaselineColourDescriptor;
+            //
+            if ( !aCell.IsDescriptor )
+            {
+                float rF = KRampBaselineColourStart.R;
+                float gF = KRampBaselineColourStart.G;
+                float bF = KRampBaselineColourStart.B;
+                //
+                float count = aCell.RelationshipManager.EmbeddedReferencesTo.Count + 1.0f;
+                float val = (float) Math.Log( count );
+                val /= iDomain;
+                //
+                rF += ( ( KRampBaselineColourEnd.R - KRampBaselineColourStart.R ) * val );
+                gF += ( ( KRampBaselineColourEnd.G - KRampBaselineColourStart.G ) * val );
+                bF += ( ( KRampBaselineColourEnd.B - KRampBaselineColourStart.B ) * val );
+                //
+                int r = Math.Min( Math.Max( 0, (int) rF ), 255 );
+                int g = Math.Min( Math.Max( 0, (int) gF ), 255 );
+                int b = Math.Min( Math.Max( 0, (int) bF ), 255 );
+                //
+                return System.Drawing.Color.FromArgb( r, g, b );
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Internal constants
+        private const int KHeaderBoxLineCornerOffset = 5;
+        private const int KShrinkSize = -3;
+        private const float KBorderLightenAmount = 0.2f;
+        private const float KHeaderBoxWidth = 2.0f;
+        private Color KRampBaselineColourStart = Color.LightBlue;
+        private Color KRampBaselineColourEnd = Color.Red;
+        private Color KBaselineColourDescriptor = Color.Gold;
+        #endregion
+
+        #region Data members
+        private float iDomain = 0.01f;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByIsolation.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,185 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Contents.Bases;
+using SymbianUtils.Colour;
+using SymbianUtils.Graphics;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Renderers.Contents
+{
+    internal class HeapCellRendererColourByIsolation : HeapCellRendererByColour, IHeapCellRendererContent 
+    {
+        #region Constructors & destructor
+        public HeapCellRendererColourByIsolation()
+        {
+        }
+        #endregion
+
+        #region From IHeapCellRendererContent
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+            if  ( aReconstructor != null )
+            {
+                int min = aReconstructor.Statistics.StatsAllocated.CellNumberOfReferencesLowest.RelationshipManager.ReferencedBy.Count + 1;
+                double logMin = Math.Log( (double) min );
+                //
+                int max = aReconstructor.Statistics.StatsAllocated.CellNumberOfReferencesGreatest.RelationshipManager.ReferencedBy.Count + 1;
+                double logMax = Math.Log( (double) max );
+
+                iDomain = (float) ( logMax - logMin ); 
+            }
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+            iLargestRectangleCalculator = new HeapCellLargestRectangleCalculator( aNavigator, 1 /* skip first box, start at 2nd box which has index 1 */ );
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+            Color fillColour = ColourForHeapCell( aCell );
+            //
+            string text = aCell.SymbolStringWithoutDescriptorPrefix;
+            PaintBoxedTextWithLuminanceHandling( text, aGraphics, fillColour );
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            // Get the cell colour that is associated with the cell symbol object type
+            aMetaData.CellBoxColor = ColourForHeapCell( aCell );
+
+            // Draw actual cell
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+            using ( SolidBrush brush = new SolidBrush( aMetaData.CellBoxColor ) )
+            {
+                aGraphics.FillRectangle( brush, boxRect.Rectangle );
+            }
+
+            // If first box, we show the number of inwards links to the cell
+            HeapCell.TRegion region = aMetaData.Region;
+            if ( region == HeapCell.TRegion.EHeader && aMetaData.CellBoxIndex == 0 )
+            {
+                boxRect.Inflate( KShrinkSize, KShrinkSize );
+
+                // Draw the fill
+                Color lightenColor = ColourUtils.LightenMore( aMetaData.CellBoxColor );
+                using ( SolidBrush brush = new SolidBrush( lightenColor ) )
+                {
+                    aGraphics.FillRectangle( brush, boxRect.Rectangle );
+                }
+                lightenColor = ColourUtils.Lighten( lightenColor );
+                using ( Pen borderPen = new Pen( lightenColor, KHeaderBoxWidth ) )
+                {
+                    aGraphics.DrawRectangle( borderPen, boxRect.Rectangle );
+                }
+
+                // Draw the count
+                int count = aCell.RelationshipManager.ReferencedBy.Count;
+                if ( count == 0 )
+                {
+                    PaintBoxedText( count.ToString(), aGraphics, Color.Red, boxRect );
+                }
+                else
+                {
+                    PaintBoxedTextWithLuminanceHandling( count.ToString(), aGraphics, Color.Black, boxRect );
+                }
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return false; }
+        }
+
+        public void SetupFilters()
+        {
+        }
+        #endregion
+
+        #region Internal methods
+        private Color ColourForHeapCell( HeapCell aCell )
+        {
+            float rF = KRampBaselineColourStart.R;
+            float gF = KRampBaselineColourStart.G;
+            float bF = KRampBaselineColourStart.B;
+            //
+            float count = aCell.RelationshipManager.ReferencedBy.Count + 1.0f;
+            float val = (float) Math.Log( count );
+            val /= iDomain;
+            //
+            rF += ( ( KRampBaselineColourEnd.R - KRampBaselineColourStart.R ) * val );
+            gF += ( ( KRampBaselineColourEnd.G - KRampBaselineColourStart.G ) * val );
+            bF += ( ( KRampBaselineColourEnd.B - KRampBaselineColourStart.B ) * val );
+            //
+            int r = Math.Min( Math.Max( 0, (int) rF ), 255 );
+            int g = Math.Min( Math.Max( 0, (int) gF ), 255 );
+            int b = Math.Min( Math.Max( 0, (int) bF ), 255 );
+            //
+            return System.Drawing.Color.FromArgb( r, g, b );
+        }
+        #endregion
+
+        #region Internal constants
+        private Color KRampBaselineColourStart = Color.DarkBlue;
+        private Color KRampBaselineColourEnd = Color.Coral;
+        private const float KHeaderBoxWidth = 2.0f;
+        private const int KShrinkSize = -3;
+        private const float KBorderLightenAmount = 0.2f;
+        #endregion
+
+        #region Data members
+        private float iDomain = 0.01f;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByLength.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Contents.Bases;
+
+namespace HeapCtrlLib.Renderers.Contents
+{
+    internal class HeapCellRendererColourByLength : HeapCellRendererByColour, IHeapCellRendererContent 
+    {
+        #region Constructors & destructor
+        public HeapCellRendererColourByLength()
+        {
+        }
+        #endregion
+
+        #region From IHeapCellRendererContent
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+            if  ( aReconstructor != null )
+            {
+                uint largestLenAlloc = aReconstructor.Statistics.StatsAllocated.CellLargest.Length;
+                uint largestLenFree = aReconstructor.Statistics.StatsFree.CellLargest.Length;
+                iCellLengthLongest = Math.Max( largestLenAlloc, largestLenFree );
+                //
+                uint smallestLenAlloc = aReconstructor.Statistics.StatsAllocated.CellSmallest.Length;
+                uint smallestLenFree = aReconstructor.Statistics.StatsFree.CellSmallest.Length;
+                iCellLengthSmallest = Math.Min( smallestLenAlloc, smallestLenFree );
+            }
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+            iLargestRectangleCalculator = new HeapCellLargestRectangleCalculator( aNavigator );
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+            Color fillColour = RampedColourByIntensityRange( KBiggestCellColour, aCell.Length, iCellLengthSmallest, iCellLengthLongest );
+            //
+            string text = aCell.SymbolStringWithoutDescriptorPrefix;
+            PaintBoxedTextWithLuminanceHandling( text, aGraphics, fillColour );
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            // We paint the cell a different shade of red, depending on it's length. The larger the heap cell,
+            // then the more intense the colour. Shorter length cells are de-emphasised.
+            aMetaData.CellBoxColor = RampedColourByIntensityRange( KBiggestCellColour, aCell.Length, 
+                                                                   iCellLengthSmallest, iCellLengthLongest );
+
+            // Draw actual cell
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+
+            using ( SolidBrush brush = new SolidBrush( aMetaData.CellBoxColor ) )
+            {
+                aGraphics.FillRectangle( brush, boxRect.Rectangle );
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return false; }
+        }
+
+        public void SetupFilters()
+        {
+        }
+        #endregion
+
+        #region Internal constants
+        private Color KBiggestCellColour = Color.Red;
+        #endregion
+
+        #region Data members
+        private uint iCellLengthLongest = 0;
+        private uint iCellLengthSmallest = 0;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourByObject.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,160 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics.Tracking.Base;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Dialogs;
+using HeapCtrlLib.Factories;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapCtrlLib.Renderers.Contents.Bases;
+
+namespace HeapCtrlLib.Renderers.Contents
+{
+    internal class HeapCellRendererColourByObject : HeapCellRendererByColour, IHeapCellRendererContent 
+    {
+        #region Constructors & destructor
+        public HeapCellRendererColourByObject()
+        {
+        }
+        #endregion
+
+        #region From IHeapCellRendererContent
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+            iRenderer = aRenderer;
+            //
+            iFactory = (FactoryByObject) aRenderer.Factory;
+            iFactory.PrepareColourHashes( aReconstructor, StandardColours );
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+            iLargestRectangleCalculator = new HeapCellLargestRectangleCalculator( aNavigator );
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+            Color fillColour = ColorForCell( aCell );
+            //
+            string text = "Unknown";
+            if ( aCell.Symbol != null )
+            {
+                text = aCell.Symbol.ObjectWithoutSection;
+            }
+            //
+            PaintBoxedTextWithLuminanceHandling( text, aGraphics, fillColour );
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            // Get the cell colour that is associated with the cell symbol object type
+            aMetaData.CellBoxColor = RampedColourByBoxNumber( ColorForCell( aCell ), aMetaData.CellBoxCount, aCell.Address, aAddress );
+
+            // Draw actual cell
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+            using ( SolidBrush brush = new SolidBrush( aMetaData.CellBoxColor ) )
+            {
+                aGraphics.FillRectangle( brush, boxRect.Rectangle );
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return true; }
+        }
+
+        public void SetupFilters()
+        {
+            if ( iRenderer != null )
+            {
+                HeapCellFilterTripletDictionary dictionary = new HeapCellFilterTripletDictionary( ColourHashes );
+                HeapRendererFilterConfigDialog dialog = new HeapRendererFilterConfigDialog( dictionary );
+                if ( dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK )
+                {
+                    ColourHashes = dialog.Dictionary;
+                    iRenderer.Invalidate();
+                }
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private HeapCellFilterTripletDictionary ColourHashes
+        {
+            get { return iFactory.ColourHashes; }
+            set { iFactory.ColourHashes = value; }
+        }
+
+        private Color ColorForCell( HeapCell aCell )
+        {
+            Color fillColour = HeapCellRendererColour.ColourByCellType( aCell );
+            //
+            if ( aCell.Type == HeapCell.TType.EAllocated && !aCell.IsUnknown )
+            {
+                string hash = aCell.Symbol.ObjectWithoutSection;
+                //
+                HeapCellFilterTriplet val = ColourHashes[ hash ];
+                System.Diagnostics.Debug.Assert( val != null );
+                fillColour = val.Color;
+            }
+            //
+            return fillColour;
+        }
+        #endregion
+
+        #region Data members
+        private HeapDataRenderer iRenderer = null;
+        private FactoryByObject iFactory = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Contents/HeapCellRendererColourBySymbol.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using SymbianUtils.Graphics;
+using SymbianStructuresLib.Debug.Symbols;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics.Tracking.Base;
+using HeapCtrlLib.Dialogs;
+using HeapCtrlLib.Factories;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapCtrlLib.Renderers.Contents.Bases;
+
+namespace HeapCtrlLib.Renderers.Contents
+{
+    internal class HeapCellRendererColourBySymbol : HeapCellRendererByColour, IHeapCellRendererContent 
+    {
+        #region Constructors & destructor
+        public HeapCellRendererColourBySymbol()
+        {
+        }
+        #endregion
+
+        #region API
+        public static string MakeColourHash( Symbol aSymbol )
+        {
+            System.Diagnostics.Debug.Assert( aSymbol != null );
+            //
+            string ret = string.Format( "{0:x8} {1} [{2}]", aSymbol.Address, aSymbol.Name, aSymbol.Object );
+            return ret;
+        }
+        #endregion
+
+        #region From IHeapCellRendererContent
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+            iRenderer = aRenderer;
+            //
+            iFactory = (FactoryBySymbol) aRenderer.Factory;
+            iFactory.PrepareColourHashes( aReconstructor, StandardColours );
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+            iLargestRectangleCalculator = new HeapCellLargestRectangleCalculator( aNavigator );
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+            Color fillColour = ColorForCell( aCell );
+            //
+            string text = aCell.SymbolStringWithoutDescriptorPrefix;
+            PaintBoxedTextWithLuminanceHandling( text, aGraphics, fillColour );
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public void PaintContent( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize )
+        {
+            // Get the cell colour that is associated with the cell symbol object type
+            aMetaData.CellBoxColor = RampedColourByBoxNumber( ColorForCell( aCell ), aMetaData.CellBoxCount, aCell.Address, aAddress );
+
+            // Draw actual cell
+            SymRect boxRect = new SymRect( aPosition, aBoxSize );
+            boxRect.HalfOffset( aPaddingSize );
+            using ( Brush brush = new SolidBrush( aMetaData.CellBoxColor ) )
+            {
+                aGraphics.FillRectangle( brush, boxRect.Rectangle );
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return true; }
+        }
+
+        public void SetupFilters()
+        {
+            if ( iRenderer != null )
+            {
+                HeapCellFilterTripletDictionary dictionary = new HeapCellFilterTripletDictionary( ColourHashes );
+                HeapRendererFilterConfigDialog dialog = new HeapRendererFilterConfigDialog( dictionary );
+                if ( dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK )
+                {
+                    ColourHashes = dialog.Dictionary;
+                    iRenderer.Invalidate();
+                }
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private HeapCellFilterTripletDictionary ColourHashes
+        {
+            get { return iFactory.ColourHashes; }
+            set { iFactory.ColourHashes = value; }
+        }
+
+        private Color ColorForCell( HeapCell aCell )
+        {
+            Color fillColour = HeapCellRendererColour.ColourByCellType( aCell );
+            //
+            if ( aCell.Type == HeapCell.TType.EAllocated && !aCell.IsUnknown )
+            {
+                string hash = MakeColourHash( aCell.Symbol );
+                //
+                HeapCellFilterTriplet val = ColourHashes[ hash ];
+                System.Diagnostics.Debug.Assert( val != null );
+                fillColour = val.Color;
+            }
+            //
+            return fillColour;
+        }
+        #endregion
+
+        #region Internal constants
+        #endregion
+
+        #region Data members
+        private HeapDataRenderer iRenderer = null;
+        private FactoryBySymbol iFactory = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/HeapDataRenderer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,1231 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Windows.Forms;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Factories;
+using HeapCtrlLib.Types;
+using SymbianUtils.Range;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Renderers
+{
+    internal class HeapDataRenderer : UserControl
+    {
+        #region Delegates & events
+        public delegate void AddressChangeHandler( uint aAddressOld, uint aAddressNew, HeapCell aFirstCell, int aFirstCellIndex );
+        public event AddressChangeHandler AddressChanged;
+        public delegate void CellSelectionHandler( HeapCell aCell );
+        public event CellSelectionHandler CellSelected;
+        public delegate void CellDoubleClickHandler( HeapCell aCell );
+        public event CellDoubleClickHandler CellDoubleClicked;
+        public delegate void CellRightClickedHandler( HeapCell aCell, RawItem aItem, Point aViewerPos );
+        public event CellRightClickedHandler CellRightClicked;
+        #endregion
+
+        #region Constructors & destructor
+        internal HeapDataRenderer()
+        {
+            InitializeComponent();
+            //
+            LoadTypeSet( THeapCtrlRenderingType.EHeapCtrlRenderingTypeByCell );
+            //
+            this.SetStyle( ControlStyles.UserPaint, true );
+            this.SetStyle( ControlStyles.DoubleBuffer, true );
+            this.SetStyle( ControlStyles.AllPaintingInWmPaint, true );
+            this.SetStyle( ControlStyles.ResizeRedraw, true );
+            this.SetStyle( ControlStyles.Selectable, true );
+            //
+            this.MouseWheel += new MouseEventHandler( HeapDataRenderer_MouseWheel );
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if  ( disposing )
+            {
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+        #region Component Designer generated code
+        private void InitializeComponent()
+        {
+            this.iLbl_NoContent = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iLbl_NoContent
+            // 
+            this.iLbl_NoContent.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iLbl_NoContent.Location = new System.Drawing.Point( 0, 0 );
+            this.iLbl_NoContent.Name = "iLbl_NoContent";
+            this.iLbl_NoContent.Size = new System.Drawing.Size( 600, 408 );
+            this.iLbl_NoContent.TabIndex = 0;
+            this.iLbl_NoContent.Text = "No Content";
+            this.iLbl_NoContent.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // HeapDataRenderer
+            // 
+            this.Controls.Add( this.iLbl_NoContent );
+            this.DoubleBuffered = true;
+            this.Name = "HeapDataRenderer";
+            this.Size = new System.Drawing.Size( 600, 408 );
+            this.MouseDown += new System.Windows.Forms.MouseEventHandler( this.HeapDataRenderer_MouseDown );
+            this.MouseMove += new System.Windows.Forms.MouseEventHandler( this.HeapDataRenderer_MouseMove );
+            this.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler( this.HeapDataRenderer_MouseDoubleClick );
+            this.MouseLeave += new System.EventHandler( this.HeapDataRenderer_MouseLeave );
+            this.MouseUp += new System.Windows.Forms.MouseEventHandler( this.HeapDataRenderer_MouseUp );
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler( this.HeapDataRenderer_KeyDown );
+            this.ResumeLayout( false );
+
+        }
+        #endregion
+
+        #region API
+        public void SetupFilters()
+        {
+            if ( !SupportsFiltering )
+            {
+                throw new NotSupportedException();
+            }
+
+            iFactory.Renderers.Content.SetupFilters();
+        }
+
+        public void LoadTypeSet( THeapCtrlRenderingType aType )
+        {
+            iFactory = HeapCtrlLib.Factories.Factory.CreateByType( aType );
+
+            // Set sizes
+            CellBoxSize = iFactory.CellBoxSize( Zoom );
+            CellPadding = iFactory.CellPadding( Zoom );
+
+            // Do init.
+            InitialiseRenderers();
+        }
+
+        public int RowForAddress( uint aAddress )
+        {
+            uint addressOffset = aAddress - Reconstructor.Statistics.HeapAddressStart;
+            uint bytesPerRow = BytesPerRow;
+            int row = (int) ( addressOffset / bytesPerRow );
+            //System.Diagnostics.Debug.WriteLine( "base: 0x" + Reconstructor.Statistics.HeapAddressStart.ToString("x8") + ", offset: 0x" + addressOffset.ToString("x8") + ", addr: 0x" + aAddress.ToString("x8") + ", row: " + row + ", remainder: " + ( addressOffset % bytesPerRow ) + ", bytesPerRow: " + bytesPerRow );
+            //
+            return row;
+        }
+        #endregion
+
+        #region Properties
+        public HeapReconstructor Reconstructor
+        {
+            get
+            {
+                return iReconstructor;
+            }
+            set
+            {
+                iReconstructor = value;
+                if  ( iReconstructor != null )
+                {
+                    iCells = iReconstructor.Data;
+                    InitialiseRenderers();
+                    if  ( iCells.Count > 0 )
+                    {
+                        HeapCell cell = Cells[ 0 ];
+
+                        // Must first set the address, or else this messes up
+                        // VisibleAddressRange...
+                        Address = cell.Address;
+
+                        // ... which is needed by FocusedCell when changing
+                        // the focus.
+                        FocusedCell = cell;
+                    }
+                }
+            }
+        }
+
+        public HeapCellArray Cells
+        {
+            get
+            {
+                return iCells;
+            }
+        }
+
+        public HeapCell FocusedCell
+        {
+            get
+            {
+                return iFocusedCellKeyboard;
+            }
+            set
+            {
+                iFocusedCellKeyboard = value;
+                if  ( iFocusedCellKeyboard != null )
+                {
+                    uint visRangeMin = (uint) VisibleAddressRange.Min;
+                    uint visRangeMax = (uint) VisibleAddressRange.Max - BytesPerRow;
+
+                    // Do we need to move the view?
+                    int currentMinRow = RowForAddress( visRangeMin );
+                    int row = RowForAddress( value.Address );
+                    int currentMaxRow = RowForAddress ( visRangeMax );
+
+                    //
+                    //System.Diagnostics.Debug.WriteLine( "row: " + row + ", minR: " + currentMinRow + "(" + visRangeMin.ToString("x8") + "), maxR: " + currentMaxRow + "(" + visRangeMax.ToString("x8") + ")" );
+                    //System.Diagnostics.Debug.WriteLine( " " );
+
+                    if  ( row < currentMinRow || row > currentMaxRow )
+                    {
+                        Address = (uint) ( Reconstructor.Statistics.HeapAddressStart + ( row * BytesPerRow ) );
+                    }
+                    else
+                    {
+                        Invalidate();
+                    }
+                }
+
+                if  ( CellSelected != null )
+                {
+                    CellSelected( iFocusedCellKeyboard );
+                }
+            }
+        }
+
+        public uint Address
+        {
+            get { return iCellAddress; }
+            set
+            {
+                this.Enabled = ( value > 0 );
+                iLbl_NoContent.Visible = ( value == 0 );
+
+                // Validate
+                int index = -1;
+                HeapCell cell = Cells.CellByAddress( value, out index );
+                if  ( cell != null )
+                {
+                    iFactory.PopupManager.PopupHide();
+                    //
+                    iCellIndex = index;
+                    uint oldAddress = iCellAddress;
+                    iCellAddress = value;
+                    iFocusedCellMouse = null;
+                    //
+                    if  ( AddressChanged != null )
+                    {
+                        AddressChanged( oldAddress, iCellAddress, cell, iCellIndex );
+                    }
+                    //
+                    Invalidate();
+                }
+                else if ( value == 0 )
+                {
+                    // Do nothing, we're disabled
+                }
+                else
+                {
+                    // Bad address
+                    throw new ArgumentException( "Invalid cell address", "value" );
+                }
+            }
+        }
+
+        public uint BytesPerRow
+        {
+            get
+            {
+                uint bytesPerRow = (uint) RowsAndColumns.Width * 4;
+                return bytesPerRow;
+            }
+        }
+
+        public uint BytesPerScreen
+        {
+            get
+            {
+                uint bytesPerScreen = BytesPerRow * (uint) RowsAndColumns.Height;
+                return bytesPerScreen;
+            }
+        }
+
+        public THeapCtrlZoom Zoom
+        {
+            get { return iZoom; }
+            set
+            {
+                if ( value != iZoom )
+                {
+                    // Get base size from factory
+                    CellBoxSize = iFactory.CellBoxSize( value );
+                    CellPadding = iFactory.CellPadding( value );
+                }
+                //
+                iZoom = value;
+            }
+        }
+
+        public AddressRange VisibleAddressRange
+        {
+            get
+            {
+                AddressRange range = new AddressRange();
+                //
+                range.UpdateMin( Address );
+                range.UpdateMax( Address + BytesPerScreen );
+                //
+                return range;
+            }
+        }
+
+        public bool SupportsFiltering
+        {
+            get { return iFactory.Renderers.Content.SupportsFiltering; }
+        }
+
+        public HeapCellArrayBase BreadcrumbCellsOutgoing
+        {
+            get { return iBreadcrumbCellsOutgoing; }
+            set { iBreadcrumbCellsOutgoing = new HeapCellArrayUnsorted( value ); }
+        }
+
+        public HeapCellArrayBase BreadcrumbCellsIncoming
+        {
+            get { return iBreadcrumbCellsIncoming; }
+            set { iBreadcrumbCellsIncoming = new HeapCellArrayUnsorted( value ); }
+        }
+
+        internal Factory Factory
+        {
+            get { return iFactory; }
+        }
+        #endregion
+
+        #region Co-ordinate mapping
+        public Point AddressToPixelCoordinate( uint aAddress )
+        {
+            Point ret = new Point( 0, 0 );
+            //
+            Size overallPaddingSize = RowsAndColumnsRemainingPixels;
+            Size rowAndColumnDimensions = RowsAndColumns;
+
+            // First, work out how many boxes would be required to draw
+            // the specific cell address
+            long delta = ((long) aAddress - (long) iCellAddress);
+
+            // This can be a negative number
+            int boxesForDelta = (int) ( delta / KDWordSize );
+
+            // Then work out how many rows and columns would be needed to reach
+            // that value.
+            Point numberOfRowsAndColumns = new Point( 0, 0 );
+
+            if ( delta > 0 )
+            {
+                // Going forwards from current top left of view port.
+                numberOfRowsAndColumns.Y = ( boxesForDelta / rowAndColumnDimensions.Width );
+                numberOfRowsAndColumns.X = ( boxesForDelta - ( numberOfRowsAndColumns.Y * rowAndColumnDimensions.Width ) );
+            }
+            else
+            {
+                numberOfRowsAndColumns.Y = ( boxesForDelta / rowAndColumnDimensions.Width ) - 1;
+                numberOfRowsAndColumns.X = Math.Abs( ( numberOfRowsAndColumns.Y * rowAndColumnDimensions.Width ) - boxesForDelta );
+            }
+
+            // Work our pixel pos
+            ret.X = numberOfRowsAndColumns.X * CellBoxSizeIncludingPadding.Width;
+            ret.Y = numberOfRowsAndColumns.Y * CellBoxSizeIncludingPadding.Height;
+
+            // And take into account padding and header size
+            ret.X += CellBoxRect.X;
+            ret.Y += CellBoxRect.Y;
+
+            //
+            return ret;
+        }
+
+        public Point CoordinateToBox( Point aPixelPos )
+        {
+            Point ret = new Point( -1, -1 );
+            //
+            Size rowsAndColumns = RowsAndColumns;
+            if  ( CellBoxRect.Contains( aPixelPos ) )
+            {
+                Size overallPaddingSize = RowsAndColumnsRemainingPixels;
+
+                // Work out which row this event occurs within.
+                int row = ( aPixelPos.Y - ( overallPaddingSize.Height / 2 ) ) / CellBoxSizeIncludingPadding.Height;
+                if  ( row >= 0 && row < rowsAndColumns.Height )
+                {
+                    // Work out the column index for that cell.
+                    int xpos = aPixelPos.X - ( overallPaddingSize.Width / 2 ) - CellAddressHeaderSize.Width;
+
+                    // How many boxes could we have rendered for that xpos
+                    int boxCount = ( xpos / CellBoxSizeIncludingPadding.Width );
+
+                    ret.X = boxCount;
+                    ret.Y = row;
+                }
+            }
+            //System.Diagnostics.Debug.WriteLine( "aPixelPos[ " + aPixelPos.X + ", " + aPixelPos.Y + " ], boxPos: [ " + ret.X + ", " + ret.Y + " ]" );
+            //
+            return ret;
+        }
+
+        public Point BoxCoordinateByAddress( uint aAddress )
+        {
+            Point ret = new Point( -1, -1 );
+
+            // First, work out how many boxes would be required to draw
+            // the specific cell address
+            uint delta = aAddress - iCellAddress;
+            int boxesForDelta = (int) ( delta / KDWordSize );
+
+            // Then work out how many rows & columns would need to be
+            // drawn to reach that value.
+            Size rowAndColumnDimensions = RowsAndColumns;
+            ret.Y = boxesForDelta / rowAndColumnDimensions.Width;
+            ret.X = boxesForDelta - ( ret.Y * rowAndColumnDimensions.Width );
+            //
+            return ret;
+        }
+
+        public uint AddressByBoxCoordinates( Point aBoxCoordinates )
+        {
+            uint ret = iCellAddress;
+            //
+            if  ( Cells.Count > 0 && aBoxCoordinates.X >= 0 && aBoxCoordinates.Y >= 0 )
+            {
+                Size rowsAndColumns = RowsAndColumns;
+                //
+                ret += (uint) ( aBoxCoordinates.Y * KDWordSize * rowsAndColumns.Width );
+                ret += (uint) ( aBoxCoordinates.X * KDWordSize );
+            }
+            //
+            return ret;
+        }
+
+        public uint AddressByCoordinate( Point aPixelPos )
+        {
+            Point boxPos = CoordinateToBox( aPixelPos );
+            uint ret = AddressByBoxCoordinates( boxPos );
+            return ret;
+        }
+
+        public RawItem RawItemByPixelPos( Point aPixelPos )
+        {
+            RawItem ret = null;
+            //
+            Point boxPos = CoordinateToBox( aPixelPos );
+            HeapCell cell = CellByBoxCoordinates( boxPos );
+            //
+            if ( cell != null )
+            {
+                uint rawItemAddress = AddressByBoxCoordinates( boxPos );
+                HeapCell.TRegion region = cell.RegionForAddress( rawItemAddress );
+                
+                // We only provide raw items for payload sections
+                if ( region == HeapCell.TRegion.EPayload )
+                {
+                    ret = cell[ rawItemAddress ];
+                }
+            }
+            //
+            return ret;
+        }
+
+        public HeapCell CellByPosition( Point aPixelPos )
+        {
+            HeapCell ret = null;
+            //
+            Point boxPos = CoordinateToBox( aPixelPos );
+            if  ( Cells.Count > 0 && boxPos.X >= 0 && boxPos.Y >= 0 )
+            {
+                ret = CellByBoxCoordinates( boxPos );
+            }
+            //
+            return ret;
+        }
+
+        public HeapCell CellByBoxCoordinates( Point aBoxCoordinates )
+        {
+            uint address = AddressByBoxCoordinates( aBoxCoordinates );
+            HeapCell ret = Cells.CellByAddress( address );
+            return ret;
+        }
+
+        public int CellIndex( HeapCell aCell )
+        {
+            int index = -1;
+            Cells.CellByExactAddress( aCell.Address, out index );
+            return index;
+        }
+        #endregion
+
+        #region Sizing
+        internal Rectangle CellBoxRect
+        {
+            get
+            {
+                Size overallPaddingSize = RowsAndColumnsRemainingPixels;
+                Size bodySize = RowsAndColumnsInPixels;
+                //
+                Rectangle ret = new Rectangle();
+                ret.X = ( overallPaddingSize.Width / 2 ) + CellAddressHeaderSize.Width;
+                ret.Y = overallPaddingSize.Height / 2;
+                ret.Width = bodySize.Width;
+                ret.Height = bodySize.Height;
+                //
+                return ret;
+            }
+        }
+
+        [Browsable(false)]
+        internal Size CellBoxSize
+        {
+            get { return iCellBoxSize; }
+            set
+            {
+                iCellBoxSize = value;
+                Invalidate();
+            }
+        }
+
+        internal Size CellBoxSizeIncludingPadding
+        {
+            get
+            {
+                Size size = CellBoxSize;
+                //
+                size.Width += CellPadding.Width;
+                size.Height += CellPadding.Height;
+                //
+                return size;
+            }
+        }
+
+        internal Size CellBoxSizeIncludingPaddingHalved
+        {
+            get
+            {
+                Size size = CellBoxSize;
+                //
+                size.Width += CellPadding.Width;
+                size.Height += CellPadding.Height;
+                //
+                return new Size( size.Width / 2, size.Height / 2 );
+            }
+        }
+
+        [Browsable(false)]
+        internal Size CellPadding
+        {
+            get { return iCellPadding; }
+            set
+            {
+                iCellPadding = value;
+                Invalidate();
+            }
+        }
+
+        internal Size CellPaddingHalved
+        {
+            get { return new Size( iCellPadding.Width / 2, iCellPadding.Height / 2 ); }
+        }
+
+        internal Size RowsAndColumns
+        {
+            get
+            {
+                Size s = this.Size;
+                
+                // First, strip off the address header text width
+                s.Width -= iHeaderTextWidth;
+
+                // Next, calculate how wide each box will be, including padding
+                int boxWidthPerCell = CellBoxSizeIncludingPadding.Width;
+                int cols = Math.Max( 0, ( s.Width - 1 ) / boxWidthPerCell );
+
+                // Now, do the same for rows
+                int boxHeightPerCell = CellBoxSizeIncludingPadding.Height;
+                int rows = Math.Max( 0, ( s.Height - 1 ) / boxHeightPerCell );
+                //
+                return new Size( cols, rows );
+            }
+        }
+
+        internal Size RowsAndColumnsInPixels
+        {
+            get
+            {
+                Size rowsAndCols = RowsAndColumns;
+                Size rowsAndColsInPixels = new Size( rowsAndCols.Width * CellBoxSizeIncludingPadding.Width, rowsAndCols.Height * CellBoxSizeIncludingPadding.Height );
+                //
+                return rowsAndColsInPixels;
+            }
+        }
+
+        internal Size RowsAndColumnsRemainingPixels
+        {
+            get
+            {
+                Size s = this.Size;
+                Size rowsAndColsInPixels = RowsAndColumnsInPixels;
+                //
+                int colsRemainder = s.Width - rowsAndColsInPixels.Width - CellAddressHeaderSize.Width;
+                int rowsRemainder = s.Height - rowsAndColsInPixels.Height;
+                //
+                return new Size( colsRemainder, rowsRemainder );
+            }
+        }
+
+        internal Size RowsAndColumnsRemainingPixelsDistributedEvenly
+        {
+            get
+            {
+                Size overallPaddingSize = RowsAndColumnsRemainingPixels;
+                overallPaddingSize.Width /= 2;
+                overallPaddingSize.Height /= 2;
+                return overallPaddingSize;
+            }
+        }
+
+        internal Size CellAddressHeaderSize
+        {
+            get
+            {
+                return new Size( iHeaderTextWidth, CellBoxSize.Height );
+            }
+        }
+        #endregion
+
+        #region Drawing
+        protected override void OnPaint( PaintEventArgs aArgs )
+        {
+            try
+            {
+                // First must measure the size of the header text as we need
+                // this in order to layout the boxes. We cannot measure the text width
+                // without a graphics object, hence we have to do that here. There must
+                // be a better way?
+                iHeaderTextWidth = iFactory.Renderers.Header.MeasureCellHeaderText( aArgs.Graphics );
+
+                // Store our graphics object for later use
+                iGraphics = aArgs.Graphics;
+
+                // Make the navigator object that will help us lay out the cells
+                HeapRenderingNavigator navigator = new HeapRenderingNavigator( Cells );
+
+                // Queue events we want to receive
+                navigator.iNavBegin += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavBegin( Navigator_NavBegin );
+                navigator.iNavEnd += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavEnd( Navigator_NavEnd );
+                navigator.iNavNewRowHeader += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavNewRowHeader( Navigator_NavNewRowHeader );
+                navigator.iNavNewColumn += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavNewColumn( Navigator_NavNewColumn );
+                navigator.iNavHeapCellEnd += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavHeapCellEnd( Navigator_NavHeapCellEnd );
+
+                // The padding amount we apply around the entire control area in order to
+                // center the data.
+                Size centerAlignmentPadding = RowsAndColumnsRemainingPixelsDistributedEvenly;
+
+                // The co-ordinates at which we will render a box (or header).
+                Point startPos = new Point( centerAlignmentPadding.Width, centerAlignmentPadding.Height );
+
+                // Tell the renderers we're about to start
+                iFactory.Renderers.PrepareToNavigate( navigator );
+
+                // Do it
+                navigator.Navigate( iCellIndex, iCellAddress, iHeaderTextWidth, startPos, RowsAndColumns, CellBoxSize, CellPadding );
+
+                // Draw link lines
+                aArgs.Graphics.Clip = new Region( CellBoxRect );
+
+                foreach ( HeapCell cell in BreadcrumbCellsOutgoing )
+                {
+                    RelationshipManager relManager = cell.RelationshipManager;
+
+                    // Draw embedded (outgoing) lines
+                    foreach ( RelationshipInfo outgoingRelationship in relManager.EmbeddedReferencesTo )
+                    {
+                        // Get coordinates of top left corner of the box for the specified 
+                        // address. If we have a clean link, we point right at the cell header.
+                        // If not, then we point at the box in question within the target cell.
+                        uint targetAddress = outgoingRelationship.FromCellRawItem.Data;
+                        if ( outgoingRelationship.IsCleanLink )
+                        {
+                            targetAddress = outgoingRelationship.ToCell.Address;
+                        }
+                        Point pixelPosEnd = AddressToPixelCoordinate( targetAddress );
+                        pixelPosEnd += CellBoxSizeIncludingPaddingHalved;
+                        Point pixelPosStart = AddressToPixelCoordinate( outgoingRelationship.FromCellRawItem.Address );
+                        pixelPosStart += CellBoxSizeIncludingPaddingHalved;
+                        //
+                        Color outgoingPenColour = Color.FromArgb( 120, 255, 0, 0 );
+                        using ( Pen pen = new Pen( outgoingPenColour, 4.0f ) )
+                        {
+                            pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+                            pen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
+                            //
+                            aArgs.Graphics.DrawLine( pen, pixelPosStart, pixelPosEnd );
+                        }
+                    }
+                }
+
+                foreach( HeapCell cell in BreadcrumbCellsIncoming )
+                {
+                    RelationshipManager relManager = cell.RelationshipManager;
+                    
+                    // Draw incoming links
+                    foreach ( HeapCell fromCell in relManager.ReferencedBy )
+                    {
+                        Point pixelPosStart = AddressToPixelCoordinate( fromCell.Address );
+                        pixelPosStart += CellBoxSizeIncludingPaddingHalved;
+                        Point pixelPosEnd = AddressToPixelCoordinate( cell.Address );
+                        pixelPosEnd += CellBoxSizeIncludingPaddingHalved;
+                        //
+                        Color outgoingPenColour = Color.FromArgb( 100, 0, 0, 255 );
+                        using ( Pen pen = new Pen( outgoingPenColour, 4.0f ) )
+                        {
+                            pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
+                            pen.EndCap = System.Drawing.Drawing2D.LineCap.ArrowAnchor;
+                            //
+                            aArgs.Graphics.DrawLine( pen, pixelPosStart, pixelPosEnd );
+                        }
+                    }
+                }
+            }
+            finally
+            {
+                iGraphics = null;
+                base.OnPaint( aArgs );
+            }
+        }
+        #endregion
+
+        #region Navigation call backs
+        private void Navigator_NavBegin()
+        {
+            iRenderStartTime = DateTime.Now;
+            //System.Diagnostics.Debug.WriteLine( "DRAW START" );
+
+            // Clear any existing data
+            iGraphics.Clear( Color.White );
+        }
+
+        private void Navigator_NavEnd()
+        {
+            iFactory.Renderers.RenderingComplete( iGraphics );
+
+            System.DateTime renderTimeEnd = DateTime.Now;
+            //System.Diagnostics.Debug.WriteLine( "DRAW END - " + ( renderTimeEnd.Ticks - iRenderStartTime.Ticks ) / 100 );
+        }
+
+        private void Navigator_NavNewRowHeader( uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            // Draw the address at the start of each row
+            iFactory.Renderers.Header.PaintRowHeader( iGraphics, aPosition, CellAddressHeaderSize, aAddress );
+        }
+
+        private void Navigator_NavNewColumn( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPixelPos, Point aBoxPos, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            // Draw content
+            iFactory.Renderers.Content.PaintContent( iGraphics, aMetaData, aCell, aAddress, aPixelPos, aBoxSize, aPadding );
+
+            // Draw cell border
+            iFactory.Renderers.ContentBorder.PaintContentBorder( iGraphics, aMetaData, aCell, aAddress, aPixelPos, aBoxSize, aPadding );
+
+            // If we are handling a click & drag operation, then check whether the cell
+            // needs a border.
+            if  ( iMouseSelectionCell != null )
+            {
+                // Get the cell index within the cell array 
+                int index = CellIndex( aCell );
+                int mouseBoundLower = (int) iMouseSelectionCellBoundaryLower.Tag;
+                int mouseBoundUpper = (int) iMouseSelectionCellBoundaryUpper.Tag;
+
+                if  ( index >= mouseBoundLower && index <= mouseBoundUpper )
+                {
+                    iFactory.Renderers.SelectionBorder.PaintSelectionBorder( iGraphics, aMetaData, aCell, aAddress, aPixelPos, aBoxSize, aPadding, THeapSelectionBorderType.ESelectionMouse );
+                }
+            }
+            else if ( iFocusedCellKeyboard == aCell )
+            {
+                // Draw border around currently mouse over'd cell
+                iFactory.Renderers.SelectionBorder.PaintSelectionBorder( iGraphics, aMetaData, aCell, aAddress, aPixelPos, aBoxSize, aPadding, THeapSelectionBorderType.ESelectionKeyboard );
+            }
+            else if ( iFocusedCellMouse == aCell )
+            {
+                // Draw border around currently mouse over'd cell
+                iFactory.Renderers.SelectionBorder.PaintSelectionBorder( iGraphics, aMetaData, aCell, aAddress, aPixelPos, aBoxSize, aPadding, THeapSelectionBorderType.ESelectionMouse );
+            }
+        }
+
+        private void Navigator_NavHeapCellEnd( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            iFactory.Renderers.HeapCellRenderingComplete( iGraphics, aCell, aMetaData );
+        }
+        #endregion
+
+        #region Internal constants
+        private const uint KDWordSize = SymbianUtils.RawItems.RawItem.KSizeOfOneRawItemInBytes;
+        private Label iLbl_NoContent;
+        #endregion
+
+        #region Internal methods
+        private void InitialiseRenderers()
+        {
+            if  ( Reconstructor != null )
+            {
+                iFactory.Renderers.Initialise( Cells, Reconstructor, this );
+            }
+        }
+
+        private void AsyncShowPopup( HeapCellArrayWithStatistics aCells, Point aPos, RawItem aRawItem )
+        {
+            if ( iFactory.PopupManager.SupportsRawItemInfo && aRawItem != null && aRawItem.Tag != null && aRawItem.Tag is RelationshipInfo && aCells.Count == 1 )
+            {
+                HeapCell cell = aCells[ 0 ];
+                iFactory.PopupManager.PopupShowAsync( cell, aRawItem, Reconstructor.Statistics, aPos, PointToScreen( aPos ), CellBoxSizeIncludingPadding, new KeyEventHandler( HeapDataRenderer_KeyDown ) );
+            }
+            else
+            {
+                iFactory.PopupManager.PopupShowAsync( aCells, Reconstructor.Statistics, aPos, PointToScreen( aPos ), CellBoxSizeIncludingPadding, new KeyEventHandler( HeapDataRenderer_KeyDown ) );
+            }
+
+            iMouseHoverPosition = aPos;
+        }
+        #endregion
+
+        #region Key handling
+        protected override bool ProcessCmdKey(ref Message aMsg, Keys aKeyData)
+        {
+            const int WM_KEYFIRST = 0x100;
+            bool handled = false;
+            //
+            if ( aMsg.Msg == WM_KEYFIRST )
+            {
+                //SymbianUtilsUi.Utilities.WindowMessages.PrintMessage( "RCMD [" + aKeyData + "] ", aMsg.Msg );
+                KeyEventArgs keyArgs = new KeyEventArgs( aKeyData );
+                HandleKey( this, keyArgs );
+                handled = keyArgs.Handled;
+            }
+            //
+            if  ( !handled )
+            {
+                handled = base.ProcessCmdKey( ref aMsg, aKeyData );
+            }
+            //
+            return handled;
+        }
+
+        private void HeapDataRenderer_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
+        {
+            //System.Diagnostics.Debug.WriteLine( "Key Down: " + e.KeyCode );
+            HandleKey( sender, e );
+        }
+
+        private void HandleKey( object sender, System.Windows.Forms.KeyEventArgs e )
+        {
+            switch( e.KeyCode )
+            {
+                    // Move up & down one LINE at a time...
+                case Keys.Down:
+                    ScrollByLineDelta( 1 );
+                    e.Handled = true;
+                    break;
+                case Keys.Up:
+                    ScrollByLineDelta( -1 );
+                    e.Handled = true;
+                    break;
+
+                    // Move up & down one PAGE at a time...
+                case Keys.Next:
+                    ScrollByLineDelta( RowsAndColumns.Height );
+                    e.Handled = true;
+                    break;
+                case Keys.Prior:
+                    ScrollByLineDelta( -RowsAndColumns.Height );
+                    e.Handled = true;
+                    break;
+
+                    // Move to beginning or end of heap
+                case Keys.Home:
+                    ScrollToAddress( Reconstructor.Statistics.HeapAddressStart );
+                    e.Handled = true;
+                    break;
+                case Keys.End:
+                {
+                    uint rowsForHeap = iReconstructor.Statistics.HeapSize / BytesPerRow;
+                    uint rowsPerPage = (uint) RowsAndColumns.Height;
+                    uint targetRow = rowsForHeap - rowsPerPage + 1;
+                    uint address = Reconstructor.Statistics.HeapAddressStart + ( targetRow *  BytesPerRow );
+                    ScrollToAddress( address );
+                    e.Handled = true;
+                    break;
+                }
+
+                    // Move one cell at a time
+                case Keys.Right:
+                {
+                    if  ( iFocusedCellKeyboard != null )
+                    {
+                        int index = Cells.CellIndex( iFocusedCellKeyboard );
+                        if  ( index + 1 < Cells.Count )
+                        {
+                            iFactory.PopupManager.PopupHide();
+                            FocusedCell = Cells[ index + 1 ];
+                            e.Handled = true;
+                        }
+                    }
+                    break;
+                }
+                case Keys.Left:
+                {
+                    if  ( iFocusedCellKeyboard != null )
+                    {
+                        int index = Cells.CellIndex( iFocusedCellKeyboard );
+                        if  ( index - 1 >= 0 )
+                        {
+                            iFactory.PopupManager.PopupHide();
+                            FocusedCell = Cells[ index - 1 ];
+                            e.Handled = true;
+                        }
+                    }
+                    break;
+                }
+
+                    // Unhandled
+                default:
+                    e.Handled = false;
+                    break;
+            }
+        } 
+       
+        private void ScrollByLineDelta( int aLines )
+        {
+            // Update delta to now finally take into account how many
+            // bytes we are going to offset the current address by
+            uint delta = (uint) ( aLines * BytesPerRow );
+
+            // Get current address from renderer
+            uint address = Address;
+
+            // We are going to attempt to offset the current renderer address
+            // by the delta, but we don't want to fall out of bounds (before or
+            // after the min/max address range for the heap).
+            address += delta;
+
+            // Set address
+            ScrollToAddress( address );
+        }
+
+        private void ScrollToAddress( uint aAddress )
+        {
+            // Work out the maximum address. We never prevent the user to scroll so far
+            // that they go past the last line.
+            uint rowsForHeap = Reconstructor.Statistics.HeapSize / BytesPerRow;
+            uint lastRowStartingAddress = Reconstructor.Statistics.HeapAddressStart + ( rowsForHeap *  BytesPerRow );
+            uint address = Math.Min( lastRowStartingAddress, Math.Max( Reconstructor.Statistics.HeapAddressStart, aAddress ) );
+
+            if  ( address >= Reconstructor.Statistics.HeapAddressStart )
+            {
+                Address = address;
+            }
+        }
+        #endregion
+
+        #region Mouse handling
+        /*protected override void WndProc(ref Message m)
+        {
+            SymbianUtilsUi.Utilities.WindowMessages.PrintMessage( "RNDR ", m.Msg );
+            base.WndProc (ref m);
+        }*/
+
+        private void HeapDataRenderer_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
+        {
+            if ( e.Button == MouseButtons.Right )
+            {
+                // Convert the click pos to a cell
+                HeapCell cell = CellByPosition( new Point( e.X, e.Y ) );
+                if ( cell != null && CellRightClicked != null )
+                {
+                    // Convert the click pos to a box
+                    Point boxPos = CoordinateToBox( e.Location );
+                    
+                    // and then convert the box coordinate to an address
+                    uint address = AddressByBoxCoordinates( boxPos );
+                    
+                    // And the try to map that address to a raw item
+                    RawItem rawItem = cell[ address ];
+
+                    // Then notify observer
+                    CellRightClicked( cell, rawItem, e.Location );
+                }
+            }
+            else
+            {
+                bool fc = Focus();
+                Select();
+                //System.Diagnostics.Debug.WriteLine( "RNDR Focused: " + fc );
+
+                if ( Cells.Count > 0 && iMouseSelectionCell == null )
+                {
+                    iMouseSelectionCell = CellByPosition( new Point( e.X, e.Y ) );
+                    //
+                    if ( iMouseSelectionCell != null )
+                    {
+                        iFactory.PopupManager.PopupHide();
+                        //
+                        iMouseSelectionCell.Tag = CellIndex( iMouseSelectionCell );
+                        //
+                        iMouseSelectionCellBoundaryLower = iMouseSelectionCell;
+                        iMouseSelectionCellBoundaryUpper = iMouseSelectionCell;
+                        //
+                        //System.Diagnostics.Debug.WriteLine( "MouseDOWN: [ " + e.X + ", " + e.Y + " ] " + iMouseSelectionCell.ToString() );
+                        //
+                    }
+                }
+            }
+        }
+ 
+        private void HeapDataRenderer_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
+        {
+            //System.Diagnostics.Debug.WriteLine( "MouseUP:   [ " + e.X + ", " + e.Y + " ]" );
+            if  ( Cells.Count > 0 && iMouseSelectionCell != null )
+            {
+                HeapCell mouseUpHeapCell = CellByPosition( new Point( e.X, e.Y ) );
+                //
+                if  ( mouseUpHeapCell != null )
+                {
+                    //System.Diagnostics.Debug.WriteLine( "MouseUP:   [ " + e.X + ", " + e.Y + " ] " + mouseUpHeapCell.ToString() );
+                }
+
+                FocusedCell = mouseUpHeapCell;
+
+                iMouseSelectionCell = null;
+                Invalidate();
+            }
+        }
+
+        private void HeapDataRenderer_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
+        {
+            if  ( Cells.Count > 0 )
+            {
+                Point mousePos = new Point( e.X, e.Y );
+                HeapCell cell = CellByPosition( mousePos );
+                //
+                if  ( cell != null )
+                {
+                    // Also try to get the raw item associated with the hover position. This can
+                    // also return null.
+                    RawItem rawItem = RawItemByPixelPos( mousePos );
+
+                    // Now process the mouse movement
+                    if  ( iMouseSelectionCell != null )
+                    {
+                        int mouseBoundStart = (int) iMouseSelectionCell.Tag;
+                        int mouseBoundLower = (int) iMouseSelectionCellBoundaryLower.Tag;
+                        int mouseBoundUpper = (int) iMouseSelectionCellBoundaryUpper.Tag;
+                        int originalSelectionRangeCount = ( mouseBoundUpper - mouseBoundLower );
+
+                        int index = CellIndex( cell );
+                        if  ( index < mouseBoundStart )
+                        {
+                            // Reset upper boundary
+                            iMouseSelectionCellBoundaryUpper = iMouseSelectionCell;
+                            iMouseSelectionCellBoundaryLower = cell;
+                            iMouseSelectionCellBoundaryLower.Tag = index;
+                        }
+                        else if ( index > mouseBoundStart )
+                        {
+                            // Reset lower boundary
+                            iMouseSelectionCellBoundaryLower = iMouseSelectionCell;
+                            iMouseSelectionCellBoundaryUpper = cell;
+                            iMouseSelectionCellBoundaryUpper.Tag = index;
+                        }
+                        else if ( index == mouseBoundStart )
+                        {
+                            iMouseSelectionCellBoundaryUpper = iMouseSelectionCell;
+                            iMouseSelectionCellBoundaryLower = iMouseSelectionCell;
+                        }
+
+                        // Update boundary
+                        mouseBoundLower = (int) iMouseSelectionCellBoundaryLower.Tag;
+                        mouseBoundUpper = (int) iMouseSelectionCellBoundaryUpper.Tag;
+
+                        // Work out if this is a multi-select scenario
+                        int selectionRangeCount = mouseBoundUpper - mouseBoundLower;
+                        bool selectionHasChanged = ( selectionRangeCount != originalSelectionRangeCount );
+                        if  ( selectionHasChanged && Math.Abs( selectionRangeCount ) + 1 > 1 )
+                        {
+                            // Build array of selected cells
+                            HeapCellArrayWithStatistics cells = new HeapCellArrayWithStatistics();
+                            for( index = mouseBoundLower; index <= mouseBoundUpper; index++ )
+                            {
+                                cell = Cells[ index ];
+                                cells.Add( cell );
+                            }
+
+                            // Show popup
+                            bool popupVisible = iFactory.PopupManager.Visible;
+                            Point pos = new Point( e.X, e.Y );
+
+                            if  ( !popupVisible || !( e.X == iMouseHoverPosition.X && e.Y == iMouseHoverPosition.Y ) )
+                            {
+                                if  ( !popupVisible )
+                                {
+                                    //System.Diagnostics.Debug.WriteLine( "Mouse MOVE - MS [popup not vis], Differing Coords: [ " + e.X + ", " + e.Y + " ] -> Popup Show" );
+                                    AsyncShowPopup( cells, pos, rawItem );
+                                }
+                                else
+                                {
+                                    //System.Diagnostics.Debug.WriteLine( "Mouse MOVE - MS [popup visible], Differing Coords: [ " + e.X + ", " + e.Y + " ] -> Popup Already Shown" );
+                                    iMouseHoverPosition = pos;
+                                    iFactory.PopupManager.PopupRelocate( cells, Reconstructor.Statistics, pos, PointToScreen( pos ), CellBoxSizeIncludingPadding );
+                                }
+                            }
+                            else if ( !popupVisible )
+                            {
+                                //System.Diagnostics.Debug.WriteLine( "Mouse MOVE - MS [popup not vis], Differing Coords: [ " + e.X + ", " + e.Y + " ] -> Popup Show" );
+                                AsyncShowPopup( cells, pos, rawItem );
+                            }
+                       }
+                        else if ( selectionHasChanged )
+                        {
+                            //System.Diagnostics.Debug.WriteLine( "Mouse MOVE - Have Existing Selection: [ " + e.X + ", " + e.Y + " ] -> Single Item Hover" );
+                            iFactory.PopupManager.PopupHide();
+                        }
+                    }
+                    else
+                    {
+                        if  ( iFactory.PopupManager.Visible )
+                        {
+                            if  ( ! ( e.X == iMouseHoverPosition.X && e.Y == iMouseHoverPosition.Y ) )
+                            {
+                                //System.Diagnostics.Debug.WriteLine( "Mouse MOVE: [ " + e.X + ", " + e.Y + " ] -> Popup Hidden" );
+                                iFactory.PopupManager.PopupHide();
+                            }
+                        }
+                        else if  ( ! ( e.X == iMouseHoverPosition.X && e.Y == iMouseHoverPosition.Y ) )
+                        {
+                            //System.Diagnostics.Debug.WriteLine( "Mouse MOVE: [ " + e.X + ", " + e.Y + " ] -> Popup Show Async" );
+                            Point pos = new Point( e.X, e.Y );
+                            HeapCellArrayWithStatistics cells = new HeapCellArrayWithStatistics();
+                            cells.Add( cell );
+                            AsyncShowPopup( cells, pos, rawItem );
+                        }
+                    }
+                    //
+                    Invalidate();
+                }
+                //
+                iFocusedCellMouse = cell;
+            }
+        }
+
+        private void HeapDataRenderer_MouseLeave(object sender, System.EventArgs e)
+        {
+            Point pos = System.Windows.Forms.Cursor.Position;
+            //System.Diagnostics.Debug.WriteLine( "Mouse LEAVE: Popup hidden - pos: " + pos + ", locY: " + PointToScreen( Location ).Y );
+
+            iFactory.PopupManager.PopupHide();
+            //
+            iFocusedCellMouse = null;
+            iMouseSelectionCell = null;
+            //
+            Invalidate();
+        }
+
+        private void HeapDataRenderer_MouseWheel(object sender, MouseEventArgs e)
+        {
+            // For each scroll of the mouse wheel
+            int mouseScrollLines = SystemInformation.MouseWheelScrollLines;
+
+            // Odd(?), but scrolling down results in a negative delta (-120), and
+            // scrolling up results in positive
+            int delta = ( e.Delta < 0 ) ? 1 : -1;
+            delta *= mouseScrollLines;
+
+            ScrollByLineDelta( delta );
+        }
+
+        private void HeapDataRenderer_MouseDoubleClick( object sender, MouseEventArgs e )
+        {
+            HeapCell cell = CellByPosition( new Point( e.X, e.Y ) );
+            //
+            if ( cell !=  null && CellDoubleClicked != null )
+            {
+                CellDoubleClicked( cell );
+            }
+        }
+        #endregion
+
+        #region Data members
+        private HeapCell iFocusedCellKeyboard = null;
+        private HeapCell iFocusedCellMouse = null;
+        private Point iMouseHoverPosition;
+        private HeapCell iMouseSelectionCell = null;
+        private HeapCell iMouseSelectionCellBoundaryLower = null;
+        private HeapCell iMouseSelectionCellBoundaryUpper = null;
+        private HeapReconstructor iReconstructor = null;
+        private HeapCellArray iCells = new HeapCellArray();
+        private int iHeaderTextWidth = 30;
+        private Size iCellBoxSize = new Size( 100, 100 );
+        private Size iCellPadding = new Size(  20,  20 );
+        private int iCellIndex = 0;
+        private uint iCellAddress = 0;
+        private Factory iFactory = null;
+        private Graphics iGraphics = null;
+        private THeapCtrlZoom iZoom = THeapCtrlZoom.EHeapCtrlZoomMedium;
+        private HeapCellArrayWithStatistics iSelectedCells = new HeapCellArrayWithStatistics();
+        private System.DateTime iRenderStartTime = new DateTime();
+        private HeapCellArrayUnsorted iBreadcrumbCellsOutgoing = new HeapCellArrayUnsorted();
+        private HeapCellArrayUnsorted iBreadcrumbCellsIncoming = new HeapCellArrayUnsorted();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/HeapDataRenderer.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/RowHeader/HeapCellRendererRowHeader.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers.Utilities;
+
+namespace HeapCtrlLib.Renderers.Headers
+{
+	internal class HeapCellRendererRowHeader : DisposableObject, IHeapCellRendererRowHeader
+	{
+        #region Constructors & destructor
+		public HeapCellRendererRowHeader()
+		{
+            iFont = new Font( KFontName, KFontSize, KFontStyle );
+        }
+        #endregion
+
+        #region From DisposableObject
+        protected override void CleanupManagedResources()
+        {
+            try
+            {
+                iFont.Dispose();
+            }
+            finally
+            {
+                base.CleanupManagedResources();
+            }
+        }
+        #endregion
+
+        #region From HeapCellRendererRowHeader
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+        }
+
+        public int MeasureCellHeaderText( Graphics aGraphics )
+        {
+            int size = ( int ) ( aGraphics.MeasureString( "00000000", iFont ).Width + KHeaderTextPaddingAmountInPixels );
+            return size;
+        }
+
+        public void PaintRowHeader( Graphics aGraphics, Point aPosition, Size aSize, uint aAddress )
+        {
+            Rectangle textRect = new Rectangle( aPosition, aSize );
+            string addressText = aAddress.ToString( "x8" );
+            //
+            using( SolidBrush textBrush = new SolidBrush( Color.Black ) )
+            {
+                using( StringFormat format = new StringFormat() )
+                {
+                    format.Alignment = StringAlignment.Center;
+                    format.LineAlignment = StringAlignment.Center;
+                    //
+                    aGraphics.DrawString( addressText, iFont, textBrush, textRect, format );
+                }
+            }
+        }
+        #endregion
+
+        #region Constants
+        private const string KFontName = "Lucida Console";
+        private const float KFontSize = 7.25f;
+        private const FontStyle KFontStyle = FontStyle.Bold;
+        private const float KHeaderTextPaddingAmountInPixels = 10.0f;
+        #endregion
+
+        #region Data members
+        private readonly System.Drawing.Font iFont;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/SelectionBorders/HeapCellRendererSelectionBorder.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,172 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections.Generic;
+using SymbianUtils.Graphics;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapLib;
+using HeapLib.Array;
+using HeapLib.Cells;
+using HeapLib.Reconstructor;
+
+namespace HeapCtrlLib.Renderers.SelectionBorders
+{
+	internal class HeapCellRendererSelectionBorder : HeapCellRendererColour, IHeapCellRendererSelectionBorder
+	{
+        #region Constructors & destructor
+		public HeapCellRendererSelectionBorder()
+            : this( Color.Maroon, Color.Green )
+		{
+        }
+
+        public HeapCellRendererSelectionBorder( Color aMouse, Color aKeyboard )
+        {
+            iColorForSelectionByKeyboard = aKeyboard;
+            iColorForSelectionByMouse = aMouse;
+        }
+        #endregion
+
+        #region API
+        protected virtual void FlushLines( Graphics aGraphics, List<HeapCellRendererSelectionBorderItem> aLines )
+        {
+            int lineCount = aLines.Count;
+            for ( int i = 0; i < lineCount; i++ )
+            {
+                HeapCellRendererSelectionBorderItem spec = aLines[ i ];
+                spec.Draw( aGraphics );
+            }
+        }
+        #endregion
+
+        #region Properties
+        protected virtual Color GetBorderProperties( THeapSelectionBorderType aType, out float aWidth )
+        {
+            Color ret = Color.Black;
+            aWidth = 1.0f;
+            //
+            switch( aType )
+            {
+            default:
+                break;
+            case THeapSelectionBorderType.ESelectionKeyboard:
+                aWidth = KBorderWidthSelectedCellByKeyboard;
+                ret = iColorForSelectionByKeyboard;
+                break;
+            case THeapSelectionBorderType.ESelectionMouse:
+                aWidth = KBorderWidthSelectedCellByMouse;
+                ret = iColorForSelectionByMouse;
+                break;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region From IHeapCellBorderRenderer
+        public void Initialise( HeapCellArray aCells, HeapReconstructor aReconstructor, HeapDataRenderer aRenderer )
+        {
+        }
+
+        public void PrepareToNavigate( HeapRenderingNavigator aNavigator )
+        {
+        }
+
+        public void HeapCellRenderingComplete( Graphics aGraphics, HeapCell aCell, HeapCellMetaData aMetaData )
+        {
+        }
+
+        public void RenderingComplete( Graphics aGraphics )
+        {
+            FlushLines( aGraphics, Lines );
+            iLines.Clear();
+        }
+
+        public void PaintSelectionBorder( Graphics aGraphics, HeapCellMetaData aMetaData, HeapCell aCell, uint aAddress, Point aPosition, Size aBoxSize, Size aPaddingSize, THeapSelectionBorderType aType )
+        {
+            float width;
+            Color color = GetBorderProperties( aType, out width );
+            SymRect rect = new SymRect( aPosition, aBoxSize + aPaddingSize );
+
+            if ( aMetaData.Borders[ THeapCellBorderType.ELeft ] ) // Draw left-hand outline
+            {
+                PaintCellBorder( aGraphics, aMetaData, rect.TopLeft, rect.BottomLeft, aAddress, aCell, width, color, THeapCellBorderType.ELeft );
+            }
+            if  (  aMetaData.Borders[ THeapCellBorderType.ETop ] ) // Draw top-side outline
+            {
+                PaintCellBorder( aGraphics, aMetaData, rect.TopLeft, rect.TopRight, aAddress, aCell, width, color, THeapCellBorderType.ETop );
+            }
+            if  (  aMetaData.Borders[ THeapCellBorderType.ERight ] ) // Draw right-hand outline
+            {
+                PaintCellBorder( aGraphics, aMetaData, rect.TopRight, rect.BottomRight, aAddress, aCell, width, color, THeapCellBorderType.ERight );
+            }
+            if  (  aMetaData.Borders[ THeapCellBorderType.EBottom ] ) // Draw bottom-side outline
+            {
+                PaintCellBorder( aGraphics, aMetaData, rect.BottomLeft, rect.BottomRight, aAddress, aCell, width, color, THeapCellBorderType.EBottom );
+            }
+        }
+        #endregion
+
+        #region Internal constants
+        private const float KBorderWidthSelectedCellByKeyboard = 3.0f;
+        private const float KBorderWidthSelectedCellByMouse = 3.0f;
+        #endregion
+
+        #region Internal methods
+        private List<HeapCellRendererSelectionBorderItem> Lines
+        {
+            get { return iLines; }
+        }
+
+        private void PaintCellBorder( Graphics aGraphics, HeapCellMetaData aMetaData, Point aStart, Point aEnd, uint aAddress, HeapCell aCell, float aWidth, Color aColour, THeapCellBorderType aType )
+        {
+            HeapCellRendererSelectionBorderItem spec = new HeapCellRendererSelectionBorderItem( aStart, aEnd, aWidth, aColour, aType );
+            iLines.Add( spec );
+        }
+        #endregion
+
+        #region Data members
+        private readonly Color iColorForSelectionByKeyboard;
+        private readonly Color iColorForSelectionByMouse;
+        private List<HeapCellRendererSelectionBorderItem> iLines = new List<HeapCellRendererSelectionBorderItem>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/SelectionBorders/HeapCellRendererSelectionBorderItem.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapCtrlLib.Utilities;
+
+namespace HeapCtrlLib.Renderers.SelectionBorders
+{
+	public class HeapCellRendererSelectionBorderItem
+	{
+        #region Constructors & destructor
+        public HeapCellRendererSelectionBorderItem( Point aPosStart, Point aPosEnd, float aWidth, Color aColour, THeapCellBorderType aType )
+		{
+            iPosStart = aPosStart;
+            iPosEnd = aPosEnd;
+            iWidth = aWidth;
+            iColour = aColour;
+            iType = aType;
+        }
+        #endregion
+
+        #region API
+        public void Draw( Graphics aGraphics )
+        {
+            using( Pen borderPen = new Pen( iColour, iWidth ) )
+            {
+                aGraphics.DrawLine( borderPen, iPosStart, iPosEnd );
+            }
+        }
+
+        public void Draw3d( Graphics aGraphics )
+        {
+        }
+        #endregion
+
+        #region Properties
+        public THeapCellBorderType Type
+        {
+            get { return iType; }
+        }
+        #endregion
+
+        #region Data members
+        private readonly Point iPosStart;
+        private readonly Point iPosEnd;
+        private readonly float iWidth;
+        private readonly Color iColour;
+        private readonly THeapCellBorderType iType;
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Renderers/Utilities/HeapCellRendererColour.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,226 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapCtrlLib.Interfaces;
+using HeapCtrlLib.Utilities;
+using HeapCtrlLib.Renderers.Utilities;
+using HeapLib;
+using HeapLib.Array;
+using HeapLib.Cells;
+using SymbianUtils.Graphics;
+using SymbianUtils.Colour;
+
+namespace HeapCtrlLib.Renderers.Utilities
+{
+	public class HeapCellRendererColour
+	{
+        #region Constructors & destructor
+		public HeapCellRendererColour()
+		{
+        }
+        #endregion
+
+        #region Drawing
+        protected virtual void PaintBorders( HeapCellBorderInfo aBorders, Graphics aGraphics, SymRect aRect, Pen aPen )
+        {
+            if ( aBorders[ THeapCellBorderType.ELeft ] )
+            {
+                aGraphics.DrawLine( aPen, aRect.TopLeft, aRect.BottomLeft );
+            }
+            if ( aBorders[ THeapCellBorderType.ERight ] )
+            {
+                aGraphics.DrawLine( aPen, aRect.TopRight, aRect.BottomRight );
+            }
+            if ( aBorders[ THeapCellBorderType.ETop ] )
+            {
+                aGraphics.DrawLine( aPen, aRect.TopLeft, aRect.TopRight );
+            }
+            if ( aBorders[ THeapCellBorderType.EBottom ] )
+            {
+                aGraphics.DrawLine( aPen, aRect.BottomLeft, aRect.BottomRight );
+            }
+        }
+        #endregion
+
+        #region Colouring
+        public static Color ColourByCellType( HeapCell aCell )
+        {
+            bool isUnknown = false;
+            return ColourByCellType( aCell, out isUnknown );
+        }
+
+        public static Color ColourByCellType( HeapCell aCell, out bool aIsUnknown )
+        {
+            aIsUnknown = false;
+            Color ret = Color.WhiteSmoke;
+            //
+            switch ( aCell.Type )
+            {
+                case HeapCell.TType.EAllocated:
+                    {
+                        if ( aCell.IsDescriptor )
+                        {
+                            ret = CellAllocatedDescriptor;
+                        }
+                        else if ( aCell.Symbol != null )
+                        {
+                            ret = CellAllocatedWithSymbol;
+                        }
+                        else
+                        {
+                            aIsUnknown = true;
+                            ret = CellAllocatedUnknown;
+                        }
+                        break;
+                    }
+                case HeapCell.TType.EFree:
+                    ret = CellFree;
+                    break;
+            }
+            //
+            return ret;
+        }
+
+        public static Color CellFillColourByRegion( HeapCell aCell, uint aAddress, out HeapCell.TRegion aRegion )
+        {
+            // Cell coloring
+            aRegion = aCell.RegionForAddress( aAddress );
+
+            Color fillColour = Color.White;
+            switch( aRegion )
+            {
+            case HeapCell.TRegion.EHeader:
+                fillColour = Color.GhostWhite;
+                break;
+            case HeapCell.TRegion.EPayload:
+                fillColour = ColourByCellType( aCell );
+                break;
+            default:
+                System.Diagnostics.Debug.Assert( false );
+                break;
+            }
+
+            return fillColour;
+        }
+
+        public static Color RampedCellFillColourByRegion( HeapCell aCell, int aCellBoxCount, uint aAddress, out HeapCell.TRegion aRegion )
+        {
+            // Get the cell colour to use and also the region associated with
+            // the cell address.
+            Color fillColour = CellFillColourByRegion( aCell, aAddress, out aRegion );
+
+            // If we're rendering the payload we'll want to ramp the cell colour
+            // to make it easier to read.
+            if  ( aRegion == HeapCell.TRegion.EPayload )
+            {
+                fillColour = RampedColourByBoxNumber( fillColour, aCellBoxCount, aCell.Address, aAddress );
+            }
+
+            return fillColour;
+        }
+
+        public static Color RampedColourByBoxNumber( Color aBaseline, int aBoxCount, uint aCellBaseAddress, uint aAddress )
+        {
+            float cellAddressOffset = (float) ( ( aAddress - aCellBaseAddress ) / 4 );
+
+            Color dark = ColourUtils.Darken( aBaseline, 0.30f );
+            Color light = ColourUtils.Lighten( aBaseline, 0.30f );
+
+            // This is the baseline brightness for the colour
+            float brightnessBaseline = light.GetBrightness() - dark.GetBrightness();
+    
+            // This is how much brightness we can apply to each box.
+            float brightnessPerBox = ( brightnessBaseline / aBoxCount );
+          
+            // This is the brightness of the target box
+            float brightnessPercentage = brightnessPerBox * cellAddressOffset; 
+
+            Color ret = ColourUtils.Lighten( aBaseline, brightnessPercentage );
+            return ret;
+        }
+
+        public static Color RampedColourByIntensityRange( Color aMaxIntensity, long aValue, long aMin, long aMax )
+        {
+            // Calculate the difference between the maximum and minimum. This tells us how many different
+            // "intensity" values we have to work with.
+            long valueSpan = ( aMax - aMin );
+
+            // Get the brightness of the baseline colour and then scale it based upon the number of different
+            // value intensities we must cope with.
+            float brightness = aMaxIntensity.GetBrightness();
+            float brightnessPerValue = ( brightness / (float) valueSpan );
+
+            // Ramp the cell colour based upon the index
+            float percentage = brightness - ( brightnessPerValue * ( aValue - aMin ) );
+
+            Color ret = ColourUtils.Darken( aMaxIntensity, percentage );
+            return ret;
+        }
+        #endregion
+
+        #region Properties
+        public static Color CellAllocatedDescriptor
+        {
+            get { return Color.FromKnownColor( KCellAllocatedDescriptor ); }
+        }
+
+        public static Color CellAllocatedUnknown
+        {
+            get { return Color.FromKnownColor( KCellAllocatedUnknown ); }
+        }
+
+        public static Color CellAllocatedWithSymbol
+        {
+            get { return Color.FromKnownColor( KCellAllocatedWithSymbol ); }
+        }
+
+        public static Color CellFree
+        {
+            get { return Color.FromKnownColor( KCellFree ); }
+        }
+        #endregion
+
+        #region Constants
+        public const KnownColor KCellAllocatedDescriptor = KnownColor.Gold;
+        public const KnownColor KCellAllocatedUnknown = KnownColor.Firebrick;
+        public const KnownColor KCellAllocatedWithSymbol = KnownColor.OrangeRed;
+        public const KnownColor KCellFree = KnownColor.RoyalBlue;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Types/HeapCellCtrlTypes.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+
+namespace HeapCtrlLib.Types
+{
+    public enum THeapCtrlZoom
+    {
+        EHeapCtrlZoomSmall = 0,
+        EHeapCtrlZoomMedium,
+        EHeapCtrlZoomMaximum
+    }
+
+    public enum THeapCtrlRenderingType
+    {
+        EHeapCtrlRenderingTypeByCell = 0,
+        EHeapCellRenderingTypeBySymbol,
+        EHeapCellRenderingTypeByObject,
+        EHeapCellRenderingTypeByAge,
+        EHeapCellRenderingTypeByLength,
+        EHeapCellRenderingTypeByIsolation,
+        EHeapCellRenderingTypeByEmbeddedReferences
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellBorderInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+
+namespace HeapCtrlLib.Utilities
+{
+	public class HeapCellBorderInfo
+	{
+        #region Constructors & destructor
+		public HeapCellBorderInfo()
+		{
+		}
+        #endregion
+
+        #region API
+        public void SetBorder( THeapCellBorderType aType, bool aEnabled )
+        {
+            iBorders[ (int) aType ] = aEnabled;
+        }
+
+        public void Reset()
+        {
+            iBorders[ 0 ] = iBorders[ 1 ] = iBorders [ 2 ] = iBorders[ 3 ] = false;
+        }
+        #endregion
+
+        #region Properties
+        public bool this[ THeapCellBorderType aType ]
+        {
+            get 
+            {
+                return iBorders[ (int) aType ];
+            }
+        }
+        #endregion
+
+        #region Data members
+        private bool[] iBorders = new bool[ 4 ];
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellBorderType.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+
+namespace HeapCtrlLib.Utilities
+{
+    public enum THeapCellBorderType
+    {
+        ELeft = 0,
+        ERight,
+        ETop,
+        EBottom
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellFilterTriplet.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Drawing;
+using HeapLib.Statistics.Tracking.Base;
+
+namespace HeapCtrlLib.Utilities
+{
+    internal class HeapCellFilterTriplet
+    {
+        #region Constructors & destructor
+        public HeapCellFilterTriplet()
+            : this( string.Empty, KDisabledColour, false, null )
+        {
+        }
+
+        public HeapCellFilterTriplet( string aEntity, Color aColor, bool aEnabled, TrackingInfo aTrackingInfo )
+        {
+            iEntity = aEntity;
+            iColor = aColor;
+            iEnabled = aEnabled;
+            iTrackingInfo = aTrackingInfo;
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        public bool Enabled
+        {
+            get { return iEnabled; }
+            set { iEnabled = value; }
+        }
+
+        public Color Color
+        {
+            get
+            {
+                Color ret = iColor;
+                //
+                if ( iEnabled == false )
+                {
+                    ret = KDisabledColour;
+                }
+                //
+                return ret;
+            }
+            set { iColor = value; }
+        }
+
+        public Color ColorAbsolute
+        {
+            get { return iColor; }
+        }
+
+        public string Entity
+        {
+            get { return iEntity; }
+        }
+
+        public TrackingInfo TrackingInfo
+        {
+            get { return iTrackingInfo; }
+        }
+        #endregion
+
+        #region Constants
+        public static Color KDisabledColour = Color.WhiteSmoke;
+        #endregion
+
+        #region Data members
+        private bool iEnabled = true;
+        private Color iColor = KDisabledColour;
+        private readonly string iEntity;
+        private readonly TrackingInfo iTrackingInfo;
+        #endregion
+    }
+
+    internal class HeapCellFilterTripletDictionary : IEnumerable<KeyValuePair<string,HeapCellFilterTriplet>>
+    {
+        #region Constructors & destructor
+        public HeapCellFilterTripletDictionary()
+        {
+        }
+
+        public HeapCellFilterTripletDictionary( HeapCellFilterTripletDictionary aCopy )
+        {
+            foreach( KeyValuePair<string, HeapCellFilterTriplet> entry in aCopy )
+            {
+                Add( entry.Key, entry.Value.Entity, entry.Value.ColorAbsolute, entry.Value.Enabled, entry.Value.TrackingInfo );
+            }
+        }
+        #endregion
+
+        #region API
+        public void Clear()
+        {
+            iEntries.Clear();
+        }
+
+        public void Add( string aEntity, string aCaption, Color aColor, TrackingInfo aTrackingInfo )
+        {
+            HeapCellFilterTriplet triplet = new HeapCellFilterTriplet( aCaption, aColor, true, aTrackingInfo );
+            iEntries.Add( aEntity, triplet );
+        }
+
+        public void Add( string aEntity, string aCaption, Color aColor, bool aEnabled, TrackingInfo aTrackingInfo )
+        {
+            HeapCellFilterTriplet triplet = new HeapCellFilterTriplet( aCaption, aColor, aEnabled, aTrackingInfo );
+            iEntries.Add( aEntity, triplet );
+        }
+        #endregion
+
+        #region Properties
+        public HeapCellFilterTriplet this[ string aEntity ]
+        {
+            get
+            {
+                bool contained = iEntries.ContainsKey( aEntity );
+                System.Diagnostics.Debug.Assert( contained );
+                HeapCellFilterTriplet ret = iEntries[ aEntity ];
+                return ret;
+            }
+        }
+
+        public int Count
+        {
+            get { return iEntries.Count; }
+        }
+        #endregion
+
+        #region IEnumerable<KeyValuePair<string,HeapCellFilterTriplet>> Members
+        public IEnumerator<KeyValuePair<string, HeapCellFilterTriplet>> GetEnumerator()
+        {
+            return iEntries.GetEnumerator();
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            return iEntries.GetEnumerator();
+        }
+        #endregion
+
+        #region Data members
+        private Dictionary<string, HeapCellFilterTriplet> iEntries = new Dictionary<string, HeapCellFilterTriplet>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellLargestRectangleCalculator.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,181 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapLib.Cells;
+
+namespace HeapCtrlLib.Utilities
+{
+	public class HeapCellLargestRectangleCalculator
+	{
+        #region Constructors & destructor
+		public HeapCellLargestRectangleCalculator( HeapRenderingNavigator aNavigator )
+            : this( aNavigator, 0 )
+		{
+        }
+
+        public HeapCellLargestRectangleCalculator( HeapRenderingNavigator aNavigator, int aStartingBoxNumber )
+        {
+            aNavigator.iNavBegin += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavBegin( Navigator_NavBegin );
+            aNavigator.iNavEnd += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavEnd( Navigator_NavEnd );
+            aNavigator.iNavHeapCellBegin += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavHeapCellBegin( Navigator_NavHeapCellBegin );
+            aNavigator.iNavHeapCellEnd += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavHeapCellEnd( Navigator_NavHeapCellEnd );
+            aNavigator.iNavNewColumn += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavNewColumn( Navigator_NavNewColumn );
+            aNavigator.iNavNewRowBody += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavNewRowBody( Navigator_NavNewRowBody );
+            //
+            iStartingBoxNumber = aStartingBoxNumber;
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        public Rectangle Rectangle
+        {
+            get { return new Rectangle( iPosition, iSize ); }
+        }
+
+        public int NumberOfContinuousBoxes
+        {
+            get { return iMaxRunLength; }
+        }
+        #endregion
+
+        #region Navigator call backs
+        public void Navigator_NavBegin()
+        {
+        }
+
+        public void Navigator_NavEnd()
+        {
+        }
+
+        public void Navigator_NavHeapCellBegin( HeapCell aCell, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            CaptureStart( aPosition, aBoxSize, aPadding );
+        }
+
+        public void Navigator_NavHeapCellEnd( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+        }
+
+        public void Navigator_NavNewRowBody( HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            if ( aAddress == 0x700144 )
+            { int x = 0; x++; }
+
+            if ( !iFoundMaximumSize )
+            {
+                if  ( aMetaData.CellRowIndex == 1 )
+                {
+                    // If the last row was just a few items and this second row has
+                    // more (or it is a complete row) then we start the tracing again
+                    // from the beginning.
+                    int remaining = aMetaData.RemainingBoxes;
+                    if  ( remaining > iMaxRunLength )
+                    {
+                        // Reset - this row is longer
+                        if  ( iMaxRunLength < aDimensions.Width )
+                        {
+                            iMaxRunLength = 0;
+                            iPosition = aPosition;
+                            iSize = new Size( 0, aBoxSize.Height + aPadding.Height ); // aBoxSize + aPadding;
+                        }
+                        else
+                        {
+                            iSize.Width = 0;
+                            iSize.Height += aBoxSize.Height + aPadding.Height;
+                        }
+                    }
+                    else
+                    {
+                        iFoundMaximumSize = true;
+                    }
+                }
+                else if ( aMetaData.RemainingBoxes > aDimensions.Width )
+                {
+                    iSize.Width = 0;
+                    iSize.Height += aBoxSize.Height + aPadding.Height;
+                }
+                else
+                {
+                    iFoundMaximumSize = true;
+                }
+            }
+        }
+
+        public void Navigator_NavNewColumn( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPixelPos, Point aBoxPos, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            if ( aCell.Address == 0x700144 ) 
+            { int x=0; x++; }
+
+            if  ( !iFoundMaximumSize )
+            {
+                // If we must exclude the first box from our rectangle calculations,
+                // then begin the capture process again.
+                if ( aMetaData.CellBoxIndex == iStartingBoxNumber )
+                {
+                    CaptureStart( aPixelPos, aBoxSize, aPadding );
+                }
+                //
+                ++iMaxRunLength;
+                iSize.Width += aBoxSize.Width + aPadding.Width;
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void CaptureStart( Point aPosition, Size aBoxSize, Size aPadding )
+        {
+            iFoundMaximumSize = false;
+            iPosition = aPosition;
+            iMaxRunLength = 0;
+            iSize = new Size( 0, aBoxSize.Height + aPadding.Height );
+        }
+        #endregion
+
+        #region Data members
+        private readonly int iStartingBoxNumber;
+        private bool iFoundMaximumSize = false;
+        private int iMaxRunLength = 0;
+        private Size iSize = new Size();
+        private Point iPosition = new Point();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapCellMetaData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,300 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapLib.Cells;
+using SymbianUtils.RawItems;
+
+namespace HeapCtrlLib.Utilities
+{
+    public class HeapCellMetaData
+    {
+        #region Constructors & destructor
+        public HeapCellMetaData( HeapRenderingNavigator aNavigator )
+        {
+            aNavigator.iNavBegin += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavBegin( Navigator_NavBegin );
+            aNavigator.iNavEnd += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavEnd( Navigator_NavEnd );
+            aNavigator.iNavHeapCellBegin += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavHeapCellBegin( Navigator_NavHeapCellBegin );
+            aNavigator.iNavHeapCellEnd += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavHeapCellEnd( Navigator_NavHeapCellEnd );
+            aNavigator.iNavNewColumn += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavNewColumn( Navigator_NavNewColumn );
+            aNavigator.iNavNewRowBody += new HeapCtrlLib.Utilities.HeapRenderingNavigator.NavNewRowBody( Navigator_NavNewRowBody );
+        }
+        #endregion
+
+        #region Properties
+        public Point BoxCoordinates
+        {
+            get { return iBoxCoordinates; }
+            set { iBoxCoordinates = value; }
+        }
+
+        public int RemainingBoxes
+        {
+            get { return iRemainingBoxes; }
+            set { iRemainingBoxes = value; }
+        }
+
+        public int RemainingBoxesAfterThisRow
+        {
+            get { return iRemainingBoxesAfterThisRow; }
+            set { iRemainingBoxesAfterThisRow = value; }
+        }
+
+        public int RemainingRows
+        {
+            get { return iRemainingRows; }
+            set { iRemainingRows = value; }
+        }
+
+        public long RemainingBytes
+        {
+            get { return iRemainingBytes; }
+            set { iRemainingBytes = value; }
+        }
+
+        public int CellBoxIndex
+        {
+            get { return iCellBoxIndex; }
+            set { iCellBoxIndex = value; }
+        }
+
+        public int CellRowIndex
+        {
+            get { return iCellRowIndex; }
+            set { iCellRowIndex = value; }
+        }
+
+        public int CellBoxCount
+        {
+            get { return iCellBoxCount; }
+            set { iCellBoxCount = value; }
+        }
+
+        public RawItem RawItem
+        {
+            get { return iRawItem; }
+        }
+
+        public HeapCell.TRegion Region
+        {
+            get
+            {
+                System.Diagnostics.Debug.Assert( iCell != null, "Not rendering a heap cell" );
+                System.Diagnostics.Debug.Assert( iAddress > 0, "Invalid current address" );
+                //
+                HeapCell.TRegion region = iCell.RegionForAddress( iAddress );
+                return region;
+            }
+        }
+
+        public HeapCellBorderInfo Borders
+        {
+            get { return iBorders; }
+            set { iBorders = value; }
+        }
+
+        // Set by the content renderer, read by the border renderer
+        public Color CellBoxColor
+        {
+            get { return iCellBoxColor; }
+            set { iCellBoxColor = value; }
+        }
+        #endregion
+
+        #region Internal methods
+        private void CalculateBorders( HeapCell aCell, long aAddress, Size aDimensions )
+        {
+            long remainingBoxes = ( aCell.EndAddress - aAddress ) / SymbianUtils.RawItems.RawItem.KSizeOfOneRawItemInBytes;
+
+            // Start with no borders
+            Borders.Reset();
+
+            // How many boxes are left to render on this row
+            int remainingBoxesForThisLine = ( aDimensions.Width - BoxCoordinates.X );
+
+            // Its the first line if we are drawing the first row, or if we're drawing the
+            // second row and there weren't any boxes from this heap cell directly above us
+            // in the grid.
+            bool firstLine = ( CellRowIndex == 0 );
+            if  ( CellRowIndex == 1 )
+            {
+                int numberOfBoxesDrawnOnPreviousLine = ( CellBoxIndex - BoxCoordinates.X );
+                int xPosOfFirstBox = aDimensions.Width - numberOfBoxesDrawnOnPreviousLine;
+                firstLine = ( BoxCoordinates.X < xPosOfFirstBox );
+            }
+            Borders.SetBorder( THeapCellBorderType.ETop, firstLine );
+
+            // Its the last line if we are drawing the last row, or then if we're drawing
+            // the last-but-one row and there weren't any boxes from this heap cell directly
+            // below us in the grid.
+            bool lastLine = ( RemainingBoxes <= remainingBoxesForThisLine );
+            if  ( RemainingRows > 0 && BoxCoordinates.Y == aDimensions.Height - 1 )
+            {
+                lastLine = true;
+            }
+            else if ( RemainingRows == 1 )
+            {
+                // Now we need to work out how many boxes of the next row will be
+                // required to finish rendering it fully.
+                lastLine = ( BoxCoordinates.X >= RemainingBoxesAfterThisRow );
+            }
+            Borders.SetBorder( THeapCellBorderType.EBottom, lastLine );
+
+            // Its the first box if it is the absolute first box we have rendered for a given
+            // cell, or then it is the first box in a new row.
+            bool firstBox = ( CellBoxIndex == 0 ) || ( BoxCoordinates.X == 0 );
+            Borders.SetBorder( THeapCellBorderType.ELeft, firstBox );
+
+            // Its the last box if it is the absolute last box we have rendered for a given
+            // cell, or then it is the last box in a new row.
+            bool lastBox = ( CellBoxIndex == CellBoxCount - 1 ) || ( remainingBoxes == 0 ) || ( BoxCoordinates.X == aDimensions.Width - 1 );
+            Borders.SetBorder( THeapCellBorderType.ERight, lastBox );
+        }
+        #endregion
+
+        #region Navigator call backs
+        private void Navigator_NavBegin()
+        {
+        }
+
+        private void Navigator_NavEnd()
+        {
+            iCell = null;
+        }
+
+        private void Navigator_NavHeapCellBegin( HeapCell aCell, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            // Starting a new cell
+            iCell = aCell;
+            iAddress = aAddress;
+
+            // This contains the absolute number of boxes required to render a given
+            // heap cell.
+            CellBoxCount = (int) ( aCell.Length / SymbianUtils.RawItems.RawItem.KSizeOfOneRawItemInBytes );
+            BoxCoordinates = new Point();
+            RemainingBoxes = 0;
+            RemainingBoxesAfterThisRow = 0;
+            RemainingRows = 0;
+            RemainingBytes = 0;
+            CellRowIndex = 0;
+            Borders.Reset();
+ 
+            // Reset current raw item - we won't have a new one until we hit the payload section
+            iRawItem = null;
+
+            // This starts at -1 since the first act of
+            // preparing the meta data is to increment the index by one.
+            CellBoxIndex = -1;
+        }
+
+        private void Navigator_NavHeapCellEnd( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            // Finished with the cell...
+            iCell = null;
+        }
+
+        private void Navigator_NavNewColumn( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPixelPos, Point aBoxPos, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            System.Diagnostics.Debug.Assert( iCell != null && iCell.Address == aCell.Address );
+
+            // Indicate that we're processing a new box
+            ++CellBoxIndex;
+            iAddress = aAddress;
+
+            // Set our box coordinates
+            iBoxCoordinates = aBoxPos;
+
+            // Get current raw item if we're in the payload section
+            iRawItem = null;
+            try
+            {
+                HeapCell.TRegion region = Region;
+                if ( region == HeapCell.TRegion.EPayload )
+                {
+                    iRawItem = iCell[ aAddress ];
+                }
+            }
+            catch( ArgumentException )
+            {
+            }
+
+
+            // Some up front calculations that we'll need below...
+            RemainingBytes = aCell.Remainder( aAddress );
+            int remainingBoxesForThisLine = ( aDimensions.Width - BoxCoordinates.X );
+            RemainingBoxes = (int) ( RemainingBytes / SymbianUtils.RawItems.RawItem.KSizeOfOneRawItemInBytes );
+            RemainingBoxesAfterThisRow = Math.Max( 0, RemainingBoxes - remainingBoxesForThisLine );
+
+            // If we can render all the remaining boxes in the not-yet-drawn
+            // boxes from this row, we don't need anymore rows.
+            RemainingRows = 0;
+            if  ( RemainingBoxesAfterThisRow > 0 )
+            {
+                // Otherwise, we need to identify how many more rows we will need
+                // in order to complete the remaining boxes that are left over
+                // after this row's boxes.
+                RemainingRows = ( RemainingBoxesAfterThisRow / aDimensions.Width ) + 1;
+            }
+
+            // Work out the borders that should be enabled for the cell
+            CalculateBorders( aCell, aAddress, aDimensions );
+        }
+
+        private void Navigator_NavNewRowBody( HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            ++CellRowIndex;
+        }
+        #endregion
+
+        #region Data members
+        private Point iBoxCoordinates = new Point( 0, 0 );
+        private int iRemainingBoxes = 0;
+        private int iRemainingBoxesAfterThisRow = 0;
+        private int iRemainingRows = 0;
+        private long iRemainingBytes = 0;
+        private int iCellBoxIndex = 0;
+        private int iCellRowIndex = 0;
+        private int iCellBoxCount = 0;
+        private uint iAddress = 0;
+        private HeapCell iCell = null;
+        private RawItem iRawItem = null;
+        private HeapCellBorderInfo iBorders = new HeapCellBorderInfo();
+        private Color iCellBoxColor = Color.HotPink;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapRenderingNavigator.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,203 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+
+namespace HeapCtrlLib.Utilities
+{
+	public class HeapRenderingNavigator
+	{
+        #region Delegates
+        public delegate void NavBegin();
+        public delegate void NavEnd();
+        public delegate void NavHeapCellBegin( HeapCell aCell, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding );
+        public delegate void NavHeapCellEnd( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding );
+        public delegate void NavNewRowHeader( uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding );
+        public delegate void NavNewRowBody( HeapCellMetaData aMetaData, uint aAddress, Point aPosition, Size aDimensions, Size aBoxSize, Size aPadding );
+        public delegate void NavNewColumn( HeapCell aCell, HeapCellMetaData aMetaData, uint aAddress, Point aPixelPos, Point aBoxPos, Size aDimensions, Size aBoxSize, Size aPadding );
+        #endregion
+
+        #region Events
+        public event NavBegin iNavBegin;
+        public event NavEnd iNavEnd;
+        public event NavHeapCellBegin iNavHeapCellBegin;
+        public event NavHeapCellEnd iNavHeapCellEnd;
+        public event NavNewRowHeader iNavNewRowHeader;
+        public event NavNewRowBody iNavNewRowBody;
+        public event NavNewColumn iNavNewColumn;
+        #endregion
+
+        #region Constructors & destructor
+		public HeapRenderingNavigator( HeapCellArray aCells )
+		{
+            iCells = aCells;
+            //
+            iMetaData = new HeapCellMetaData( this );
+		}
+        #endregion
+
+        #region Properties
+        public HeapCellArray Cells
+        {
+            get { return iCells; }
+        }
+        #endregion
+
+        #region API
+        public void Navigate( int aStartingCellIndex, uint aStartingAddress, int aHeaderTextWidth, Point aStartOffset, Size aDimensions, Size aBoxSize, Size aPadding )
+        {
+            // This is the size of the cell including padding
+            Size cellSizeIncPadding = aBoxSize + aPadding;
+            
+            if  ( Cells.Count > 0 )
+            {
+                // The co-ordinates at which we will render a box (or header).
+                Point pos = new Point( aStartOffset.X, aStartOffset.Y - cellSizeIncPadding.Height );
+
+                // The index of the current heap cell within the iCells data structure.
+                // We start one before the requested cell, since we immediately skip
+                // on to the next one during the initialisation phase.
+                int cellIndex = aStartingCellIndex - 1;
+
+                // The total number of cells we have to work with
+                int cellCount = Cells.Count;
+
+                // The cell we are rendering. This changes as we move through the capture data.
+                HeapCell cell = null;
+
+                // The address of the currently paining box
+                uint address = aStartingAddress;
+
+                // Notify that we are starting.
+                if  ( iNavBegin != null )
+                {
+                    iNavBegin();
+                }
+
+                // Draw the cells
+                bool abort = false;
+                for( int row = 0; row < aDimensions.Height && !abort; row++ )
+                {
+                    // Handle the header at the start of each row
+                    pos.X = aStartOffset.X;
+                    pos.Y += cellSizeIncPadding.Height;
+                    if  ( iNavNewRowHeader != null )
+                    {
+                        iNavNewRowHeader( address, pos, aDimensions, aBoxSize, aPadding );
+                    }
+
+                    // Move forwards, past the header
+                    pos.X += aHeaderTextWidth;
+                    if  ( iNavNewRowBody != null )
+                    {
+                        iNavNewRowBody( iMetaData, address, pos, aDimensions, aBoxSize, aPadding );
+                    }
+
+                    // Prepare for columns in this row
+                    //System.Diagnostics.Debug.WriteLine( "Nav[" /*+ col.ToString("d2")*/ + "00," + row.ToString("d2") + "], ");
+                    //System.Diagnostics.Debug.Write( ".");
+                    for( int col = 0; col < aDimensions.Width && !abort; col++ )
+                    {
+                        // Do we need to also move to the next cell?
+                        if  ( cell == null || cell.RegionForAddress( address ) == HeapCell.TRegion.EAfterCell )
+                        {
+                            // Notify finishing a cell
+                            if  ( cell != null && iNavHeapCellEnd != null )
+                            {
+                                iNavHeapCellEnd( cell, iMetaData, address, pos, aDimensions, aBoxSize, aPadding );
+                            }
+
+                            if  ( cellIndex < cellCount - 1 )
+                            {
+                                // Get next cell
+                                cell = Cells[ ++cellIndex ];
+
+                                // Notify starting a cell
+                                if  ( iNavHeapCellBegin != null )
+                                {
+                                    iNavHeapCellBegin( cell, address, pos, aDimensions, aBoxSize, aPadding );
+                                }
+                            }
+                            else
+                            {
+                                abort = true;
+                                break;
+                            }
+                        }
+                        //
+                        if ( !abort )
+                        {
+                            // Notify starting a new box
+                            if  ( iNavNewColumn != null )
+                            {
+                                iNavNewColumn( cell, iMetaData, address, pos, new Point( col, row ), aDimensions, aBoxSize, aPadding );
+                            }
+                          
+                            // Move to next address & position
+                            pos.X += cellSizeIncPadding.Width;
+                            address += SymbianUtils.RawItems.RawItem.KSizeOfOneRawItemInBytes;
+                        }
+                    }
+                }
+
+                if  ( !abort )
+                {
+                    if  ( cell != null && iNavHeapCellEnd != null )
+                    {
+                        iNavHeapCellEnd( cell, iMetaData, address, pos, aDimensions, aBoxSize, aPadding );
+                    }
+                }
+
+                // Notify that we are ending
+                if  ( iNavEnd != null )
+                {
+                    iNavEnd();
+                }
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCellArray iCells;
+        private readonly HeapCellMetaData iMetaData;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapCtrlLib/Utilities/HeapSelectionBorderType.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+
+namespace HeapCtrlLib.Utilities
+{
+    public enum THeapSelectionBorderType
+    {
+        ESelectionKeyboard = 0,
+        ESelectionMouse
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("HeapUiLib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Nokia")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]		
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/FilterTypes.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,52 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace HeapUiLib.Controls
+{
+    public enum TFilterType
+    {
+        EFilterShowAll = 0,
+        EFilterShowCellsFree,
+        EFilterShowCellsAllocated,
+        EFilterShowCellsAllocatedDescriptor,
+        EFilterShowCellsAllocatedByType
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellInfoControl.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,232 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapUiLib.Controls
+{
+    partial class HeapCellInfoControl
+    {
+        // <summary> 
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary> 
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Component Designer generated code
+
+        // <summary> 
+        // Required method for Designer support - do not modify 
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Length",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Symbol",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Address",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Payload at",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Length",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Nesting level",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Allocation #",
+            ""}, -1 );
+            this.iLVInfoCellPayload = new System.Windows.Forms.ListView();
+            this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
+            this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
+            this.label1 = new System.Windows.Forms.Label();
+            this.iLVInfoCellHeader = new System.Windows.Forms.ListView();
+            this.columnHeader3 = new System.Windows.Forms.ColumnHeader();
+            this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
+            this.label2 = new System.Windows.Forms.Label();
+            this.iTLP = new System.Windows.Forms.TableLayoutPanel();
+            this.iTLP.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // iLVInfoCellPayload
+            // 
+            this.iLVInfoCellPayload.Columns.AddRange( new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader5,
+            this.columnHeader6} );
+            this.iLVInfoCellPayload.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iLVInfoCellPayload.FullRowSelect = true;
+            this.iLVInfoCellPayload.GridLines = true;
+            this.iLVInfoCellPayload.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+            this.iLVInfoCellPayload.Items.AddRange( new System.Windows.Forms.ListViewItem[] {
+            listViewItem1,
+            listViewItem2} );
+            this.iLVInfoCellPayload.Location = new System.Drawing.Point( 72, 90 );
+            this.iLVInfoCellPayload.MultiSelect = false;
+            this.iLVInfoCellPayload.Name = "iLVInfoCellPayload";
+            this.iLVInfoCellPayload.Size = new System.Drawing.Size( 325, 41 );
+            this.iLVInfoCellPayload.TabIndex = 9;
+            this.iLVInfoCellPayload.UseCompatibleStateImageBehavior = false;
+            this.iLVInfoCellPayload.View = System.Windows.Forms.View.Details;
+            // 
+            // columnHeader5
+            // 
+            this.columnHeader5.Width = 70;
+            // 
+            // columnHeader6
+            // 
+            this.columnHeader6.Width = 237;
+            // 
+            // label1
+            // 
+            this.label1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.label1.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.label1.Location = new System.Drawing.Point( 3, 0 );
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size( 63, 87 );
+            this.label1.TabIndex = 8;
+            this.label1.Text = "Header:";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // iLVInfoCellHeader
+            // 
+            this.iLVInfoCellHeader.Columns.AddRange( new System.Windows.Forms.ColumnHeader[] {
+            this.columnHeader3,
+            this.columnHeader4} );
+            this.iLVInfoCellHeader.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iLVInfoCellHeader.FullRowSelect = true;
+            this.iLVInfoCellHeader.GridLines = true;
+            this.iLVInfoCellHeader.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+            listViewItem5.Tag = "";
+            this.iLVInfoCellHeader.Items.AddRange( new System.Windows.Forms.ListViewItem[] {
+            listViewItem3,
+            listViewItem4,
+            listViewItem5,
+            listViewItem6,
+            listViewItem7} );
+            this.iLVInfoCellHeader.Location = new System.Drawing.Point( 72, 3 );
+            this.iLVInfoCellHeader.MultiSelect = false;
+            this.iLVInfoCellHeader.Name = "iLVInfoCellHeader";
+            this.iLVInfoCellHeader.Scrollable = false;
+            this.iLVInfoCellHeader.Size = new System.Drawing.Size( 325, 81 );
+            this.iLVInfoCellHeader.TabIndex = 6;
+            this.iLVInfoCellHeader.UseCompatibleStateImageBehavior = false;
+            this.iLVInfoCellHeader.View = System.Windows.Forms.View.Details;
+            this.iLVInfoCellHeader.KeyDown += new System.Windows.Forms.KeyEventHandler( this.iLVInfoCellHeader_KeyDown );
+            // 
+            // columnHeader3
+            // 
+            this.columnHeader3.Width = 70;
+            // 
+            // columnHeader4
+            // 
+            this.columnHeader4.Width = 237;
+            // 
+            // label2
+            // 
+            this.label2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.label2.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.label2.Location = new System.Drawing.Point( 3, 87 );
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size( 63, 47 );
+            this.label2.TabIndex = 7;
+            this.label2.Text = "Contents:";
+            this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // iTLP
+            // 
+            this.iTLP.ColumnCount = 2;
+            this.iTLP.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Absolute, 69F ) );
+            this.iTLP.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iTLP.Controls.Add( this.iLVInfoCellPayload, 1, 1 );
+            this.iTLP.Controls.Add( this.label1, 0, 0 );
+            this.iTLP.Controls.Add( this.iLVInfoCellHeader, 1, 0 );
+            this.iTLP.Controls.Add( this.label2, 0, 1 );
+            this.iTLP.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTLP.Location = new System.Drawing.Point( 0, 0 );
+            this.iTLP.Margin = new System.Windows.Forms.Padding( 5 );
+            this.iTLP.Name = "iTLP";
+            this.iTLP.RowCount = 2;
+            this.iTLP.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 65.41354F ) );
+            this.iTLP.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 34.58647F ) );
+            this.iTLP.Size = new System.Drawing.Size( 400, 134 );
+            this.iTLP.TabIndex = 10;
+            // 
+            // HeapCellInfoControl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add( this.iTLP );
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.MaximumSize = new System.Drawing.Size( 1024, 134 );
+            this.MinimumSize = new System.Drawing.Size( 400, 134 );
+            this.Name = "HeapCellInfoControl";
+            this.Size = new System.Drawing.Size( 400, 134 );
+            this.SizeChanged += new System.EventHandler( this.HeapCellInfoControl_SizeChanged );
+            this.iTLP.ResumeLayout( false );
+            this.ResumeLayout( false );
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ListView iLVInfoCellPayload;
+        private System.Windows.Forms.ColumnHeader columnHeader5;
+        private System.Windows.Forms.ColumnHeader columnHeader6;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.ListView iLVInfoCellHeader;
+        private System.Windows.Forms.ColumnHeader columnHeader3;
+        private System.Windows.Forms.ColumnHeader columnHeader4;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TableLayoutPanel iTLP;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellInfoControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,201 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Text;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics.Tracking.Base;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapLib.Reconstructor.DataSources;
+
+namespace HeapUiLib.Controls
+{
+    public partial class HeapCellInfoControl : UserControl
+    {
+        #region Constructors & destructor
+        public HeapCellInfoControl()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region Properties
+        public bool ShowStackBasedFunctionAddresses
+        {
+            get { return iShowStackBasedFunctionAddresses; }
+            set 
+            { 
+                iShowStackBasedFunctionAddresses = value; 
+                if ( value )
+                {
+                    iLVInfoCellHeader.Items[ 3 ].Text = "Symbol #1";
+                    iLVInfoCellHeader.Items[ 4 ].Text = "Symbol #2";
+                }
+                else
+                {
+                    iLVInfoCellHeader.Items[ 3 ].Text = "Nesting level";
+                    iLVInfoCellHeader.Items[ 4 ].Text = "Allocation #";
+                }
+            }
+        }
+
+        public HeapCell Cell
+        {
+            set
+            {
+                if ( value != null )
+                {
+                    UpdateInfoHeaderListView( value );
+                    UpdateInfoPayloadListView( value );
+                }
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateInfoHeaderListView( HeapCell aCell )
+        {
+            // Address
+            iLVInfoCellHeader.Items[ 0 ].SubItems[ 1 ].Text = "0x" + aCell.Address.ToString( "x8" );
+
+            // Payload address
+            iLVInfoCellHeader.Items[ 1 ].SubItems[ 1 ].Text = "0x" + aCell.StartOfPayloadAddress.ToString( "x8" ) + " -> 0x" + aCell.EndAddress.ToString( "x8" );
+
+            // Length
+            iLVInfoCellHeader.Items[ 2 ].SubItems[ 1 ].Text = aCell.Length.ToString();
+
+            // Nesting level
+            string nestingLevel = "N/A (Release EUSER)";
+            if ( aCell.Type == HeapCell.TType.EFree )
+            {
+                nestingLevel = "N/A (Free Cell)";
+            }
+            else if ( ShowStackBasedFunctionAddresses )
+            {
+                nestingLevel = "Unknown";
+                if ( aCell.Symbol2 != null )
+                {
+                    nestingLevel = aCell.Symbol2.Address.ToString( "x8" ) + " " + aCell.Symbol2.Name;
+                }
+            }
+            else if ( HeapCell.IsDebugAllocator )
+            {
+                nestingLevel = aCell.NestingLevel.ToString();
+            }
+            iLVInfoCellHeader.Items[ 3 ].SubItems[ 1 ].Text = nestingLevel;
+
+            // Allocation #
+            string allocNumber = "N/A (Release EUSER)";
+            if ( aCell.Type == HeapCell.TType.EFree )
+            {
+                allocNumber = "N/A (Free Cell)";
+            }
+            else if ( ShowStackBasedFunctionAddresses )
+            {
+                allocNumber = "Unknown";
+                if ( aCell.Symbol3 != null )
+                {
+                    allocNumber = aCell.Symbol3.Address.ToString( "x8" ) + " " + aCell.Symbol3.Name;
+                }
+            }
+            else if ( HeapCell.IsDebugAllocator )
+            {
+                allocNumber = aCell.AllocationNumber.ToString();
+            }
+            iLVInfoCellHeader.Items[ 4 ].SubItems[ 1 ].Text = allocNumber;
+        }
+
+        private void UpdateInfoPayloadListView( HeapCell aCell )
+        {
+            // Length
+            iLVInfoCellPayload.Items[ 0 ].SubItems[ 1 ].Text = aCell.PayloadLength.ToString();
+
+            // Symbol
+            if ( aCell.Symbol != null )
+            {
+                iLVInfoCellPayload.Items[ 1 ].SubItems[ 1 ].Text = aCell.Symbol.NameWithoutVTablePrefix;
+            }
+            else if ( aCell.Type == HeapCell.TType.EFree )
+            {
+                iLVInfoCellPayload.Items[ 1 ].SubItems[ 1 ].Text = "N/A (Free Cell)";
+            }
+            else
+            {
+                iLVInfoCellPayload.Items[ 1 ].SubItems[ 1 ].Text = "???";
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void HeapCellInfoControl_SizeChanged( object sender, EventArgs e )
+        {
+            int col1Width = iLVInfoCellHeader.Columns[ 0 ].Width;
+            int col2Width = iLVInfoCellHeader.Columns[ 1 ].Width;
+            int width = iLVInfoCellHeader.Width;
+            iLVInfoCellHeader.Columns[ 1 ].Width = width - col1Width;
+        }
+
+        private void iLVInfoCellHeader_KeyDown( object sender, KeyEventArgs e )
+        {
+            bool wasControl = ( e.Modifiers & Keys.Control ) == Keys.Control;
+            if ( wasControl && ( e.KeyCode == Keys.C ) )
+            {
+                if ( iLVInfoCellHeader.SelectedItems != null && iLVInfoCellHeader.SelectedItems.Count > 0 )
+                {
+                    ListViewItem item = iLVInfoCellHeader.SelectedItems[ 0 ];
+                    ListViewItem.ListViewSubItem infoItem = item.SubItems[ 1 ];
+                    Clipboard.SetText( infoItem.Text.Trim() );
+                }
+            }
+        }
+        #endregion
+
+        #region Data members
+        private bool iShowStackBasedFunctionAddresses = false;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellInfoControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,453 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Windows.Forms;
+using System.Text;
+using SymbianStructuresLib.Debug.Symbols;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+
+namespace HeapUiLib.Controls
+{
+    public class HeapCellListingControl : System.Windows.Forms.UserControl
+    {
+        #region Component Designer generated code
+        private XPTable.Models.Table iTable;
+        private XPTable.Models.TableModel iTableModel;
+        private XPTable.Models.ColumnModel iColumnModel;
+        private XPTable.Models.TextColumn iCol_Type;
+        private XPTable.Models.TextColumn iCol_Address;
+        private XPTable.Models.TextColumn iCol_Length;
+        private XPTable.Models.TextColumn iCol_Symbol;
+        private XPTable.Models.TextColumn iCol_Index;
+        private XPTable.Models.TextColumn iCol_DescriptorLength;
+        private System.ComponentModel.Container components = null;
+        #endregion
+
+        #region Constructors & destructor
+        public HeapCellListingControl()
+        {
+            InitializeComponent();
+        }
+
+        protected override void Dispose( bool disposing )
+        {
+            if( disposing )
+            {
+                if(components != null)
+                {
+                    components.Dispose();
+                }
+            }
+            base.Dispose( disposing );
+        }
+        #endregion
+
+        #region Component Designer generated code
+        private void InitializeComponent()
+        {
+            XPTable.Models.DataSourceColumnBinder dataSourceColumnBinder1 = new XPTable.Models.DataSourceColumnBinder();
+            this.iTable = new XPTable.Models.Table();
+            this.iColumnModel = new XPTable.Models.ColumnModel();
+            this.iCol_Index = new XPTable.Models.TextColumn();
+            this.iCol_Type = new XPTable.Models.TextColumn();
+            this.iCol_Address = new XPTable.Models.TextColumn();
+            this.iCol_Length = new XPTable.Models.TextColumn();
+            this.iCol_DescriptorLength = new XPTable.Models.TextColumn();
+            this.iCol_Symbol = new XPTable.Models.TextColumn();
+            this.iTableModel = new XPTable.Models.TableModel();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).BeginInit();
+            this.SuspendLayout();
+            // 
+            // iTable
+            // 
+            this.iTable.AlternatingRowColor = System.Drawing.Color.Gainsboro;
+            this.iTable.BorderColor = System.Drawing.Color.Black;
+            this.iTable.ColumnModel = this.iColumnModel;
+            this.iTable.DataMember = null;
+            this.iTable.DataSourceColumnBinder = dataSourceColumnBinder1;
+            this.iTable.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTable.EditStartAction = XPTable.Editors.EditStartAction.CustomKey;
+            this.iTable.EnableToolTips = true;
+            this.iTable.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable.FullRowSelect = true;
+            this.iTable.HeaderFont = new System.Drawing.Font( "Tahoma", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable.Location = new System.Drawing.Point( 0, 0 );
+            this.iTable.MultiSelect = true;
+            this.iTable.Name = "iTable";
+            this.iTable.NoItemsText = "No Data";
+            this.iTable.NoItemsTextColor = System.Drawing.SystemColors.ControlText;
+            this.iTable.NoItemsTextFont = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iTable.Size = new System.Drawing.Size( 791, 336 );
+            this.iTable.TabIndex = 0;
+            this.iTable.TableModel = this.iTableModel;
+            this.iTable.UnfocusedBorderColor = System.Drawing.Color.Black;
+            this.iTable.PrepareForSort += new XPTable.Events.SortEventHandler( this.iTable_PrepareForSort );
+            this.iTable.KeyDown += new System.Windows.Forms.KeyEventHandler( this.iTable_KeyDown );
+            this.iTable.DoubleClick += new System.EventHandler( this.iTable_DoubleClick );
+            // 
+            // iColumnModel
+            // 
+            this.iColumnModel.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iCol_Index,
+            this.iCol_Type,
+            this.iCol_Address,
+            this.iCol_Length,
+            this.iCol_DescriptorLength,
+            this.iCol_Symbol} );
+            // 
+            // iCol_Index
+            // 
+            this.iCol_Index.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_Index.ContentWidth = 0;
+            // 
+            // iCol_Type
+            // 
+            this.iCol_Type.ContentWidth = 29;
+            this.iCol_Type.Text = "Type";
+            this.iCol_Type.Width = 85;
+            // 
+            // iCol_Address
+            // 
+            this.iCol_Address.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_Address.ContentWidth = 46;
+            this.iCol_Address.Text = "Address";
+            this.iCol_Address.Width = 85;
+            // 
+            // iCol_Length
+            // 
+            this.iCol_Length.Alignment = XPTable.Models.ColumnAlignment.Right;
+            this.iCol_Length.ContentWidth = 39;
+            this.iCol_Length.Text = "Length";
+            this.iCol_Length.Width = 85;
+            // 
+            // iCol_DescriptorLength
+            // 
+            this.iCol_DescriptorLength.Alignment = XPTable.Models.ColumnAlignment.Right;
+            this.iCol_DescriptorLength.ContentWidth = 53;
+            this.iCol_DescriptorLength.Text = "Des. Len.";
+            this.iCol_DescriptorLength.Width = 85;
+            // 
+            // iCol_Symbol
+            // 
+            this.iCol_Symbol.ContentWidth = 70;
+            this.iCol_Symbol.Text = "Object Name";
+            this.iCol_Symbol.Width = 350;
+            // 
+            // HeapCellListingControl
+            // 
+            this.Controls.Add( this.iTable );
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.Name = "HeapCellListingControl";
+            this.Size = new System.Drawing.Size( 791, 336 );
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).EndInit();
+            this.ResumeLayout( false );
+
+		}
+        #endregion
+
+        #region API
+        public void SetFilter( TFilterType aType )
+        {
+            SetFilter( aType, null );
+        }
+
+        public void SetFilter( TFilterType aType, Symbol aSymbol )
+        {
+            iFilterType = aType;
+            iFilterSymbol = aSymbol;
+            //
+            iCol_DescriptorLength.Visible = ( aType == TFilterType.EFilterShowCellsAllocatedDescriptor );
+            //
+            UpdateListView();
+        }
+
+        public void CopySelectedDataToClipboard()
+		{
+			StringBuilder clipboardText = new StringBuilder();
+			
+			// Get columns
+			foreach( XPTable.Models.Column column in iTable.ColumnModel.Columns )
+			{
+				clipboardText.Append( column.Text + "\t" );
+			}
+			clipboardText.Append( System.Environment.NewLine );
+
+			// Do underline (there must be a better way!)
+			int len = clipboardText.Length;
+			for( int i=0; i<len; i++ )
+			{
+				clipboardText.Append( "=" );
+			}
+			clipboardText.Append( System.Environment.NewLine );
+
+			// Get cell values
+			foreach( XPTable.Models.Row row in iTable.SelectedItems )
+			{
+				foreach( XPTable.Models.Cell cell in row.Cells )
+				{
+					string text = cell.Text;
+					clipboardText.Append( text + "\t" );
+				}
+				//
+				clipboardText.Append( System.Environment.NewLine );
+			}
+			//
+			Clipboard.SetDataObject( clipboardText.ToString(), true );
+		}
+		#endregion
+
+        #region Properties
+        [Browsable( false )]
+        public HeapCell SelectedCell
+        {
+            get
+            {
+                HeapCell cell = null;
+                //
+                if  ( iTable.SelectedItems.Length > 0 )
+                {
+                    int index = iTable.SelectedIndicies[ 0 ];
+                    cell = iTable.TableModel.Rows[ index ].Tag as HeapCell;
+                }
+                //
+                return cell;
+            }
+            set
+            {
+                foreach ( XPTable.Models.Row row in iTable.TableModel.Rows )
+                {
+                    HeapCell cell = (HeapCell) row.Tag;
+                    //
+                    if ( cell.Address == value.Address )
+                    {
+                        iTable.EnsureVisible( row.Index, 0 );
+                        iTable.TableModel.Selections.Clear();
+                        iTable.TableModel.Selections.AddCell( row.Index, 0 );
+                        break;
+                    }
+                }
+            }
+        }
+
+        [Browsable( false )]
+        public HeapCellArray Cells
+        {
+            get { return iCells; }
+            set
+            {
+                iCells = value;
+                UpdateListView();
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iTable_DoubleClick( object sender, System.EventArgs e )
+        {
+            OnDoubleClick( e );
+        }
+
+		private void iTable_KeyDown( object sender, System.Windows.Forms.KeyEventArgs e )
+		{
+			OnKeyDown( e );
+		}
+
+        private void iTable_PrepareForSort( object sender, XPTable.Events.SortEventArgs e )
+        {
+            if ( e.Column == iCol_Length )
+            {
+                e.Comparer = new XPTable.Sorting.NumberComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+            else if ( e.Column == iCol_DescriptorLength )
+            {
+                e.Comparer = new XPTable.Sorting.NumberComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+            else
+            {
+                e.Comparer = new XPTable.Sorting.TextComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateListView()
+        {
+            iTable.BeginUpdate();
+            iTable.TableModel.Rows.Clear();
+            //
+            int index = 0;
+            foreach( HeapCell cell in Cells )
+            {
+                // Check whether the filter permits this item to be included.
+                if ( CheckAgainstFilter( cell ) )
+                {
+                    XPTable.Models.Row row = new XPTable.Models.Row();
+                    row.Tag = cell;
+                    //
+                    row.Cells.Add( new XPTable.Models.Cell( index.ToString( "d6" ) ) );
+                    XPTable.Models.Cell cellType = new XPTable.Models.Cell( " " + cell.TypeString );
+                    if ( cell.Type == HeapCell.TType.EAllocated )
+                    {
+                        if ( cell.IsDescriptor )
+                        {
+                            cellType.ForeColor = Color.DarkGoldenrod;
+                            cellType.ToolTipText = "Descriptor";
+                        }
+                        else
+                        {
+                            cellType.ForeColor = Color.Red;
+                        }
+                    }
+                    else if ( cell.Type == HeapCell.TType.EFree )
+                    {
+                        cellType.ForeColor = Color.Blue;
+                    }
+                    row.Cells.Add( cellType );
+                    row.Cells.Add( new XPTable.Models.Cell( "0x" + cell.Address.ToString( "x8" ) ) );
+
+                    // Must initialise "data" in order for sorting to work (XPTable's numeric sorter relies upon it).
+                    XPTable.Models.Cell cellLength = new XPTable.Models.Cell( cell.Length.ToString() );
+                    cellLength.Data = cell.Length;
+                    row.Cells.Add( cellLength );
+
+                    // If we are filtering to show only descriptor entries, then we also include an extra
+                    // column containing the descriptor length.
+                    if ( iFilterType == TFilterType.EFilterShowCellsAllocatedDescriptor )
+                    {
+                        if ( cell.IsDescriptor )
+                        {
+                            // Must initialise "data" in order for sorting to work (XPTable's numeric sorter relies upon it).
+                            XPTable.Models.Cell cellDescriptorLength = new XPTable.Models.Cell( cell.DescriptorLength.ToString() );
+                            cellDescriptorLength.Data = cell.DescriptorLength;
+                            row.Cells.Add( cellDescriptorLength );
+                        }
+                        else
+                        {
+                            row.Cells.Add( new XPTable.Models.Cell( string.Empty ) );
+                        }
+                    }
+                    else
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( string.Empty ) );
+                    }
+
+                    // Payload column
+                    if ( cell.IsDescriptor )
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( cell.DescriptorText ) );
+                    }
+                    else if ( cell.Symbol != null )
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( cell.SymbolString ) );
+                    }
+                    else
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( cell.RawItems.FirstLine ) );
+                    }
+                    //
+                    iTable.TableModel.Rows.Add( row );
+
+                    ++index;
+                }
+            }
+            
+            // Must sort if the user had previously selected a sort column
+            if ( iTable.IsValidColumn( iTable.SortingColumn ) )
+            {
+                iTable.Sort();
+            }
+
+            // Done - end transaction & redraw
+            iTable.EndUpdate();
+        }
+
+        private bool CheckAgainstFilter( HeapCell aCell )
+        {
+            bool ret = false;
+            //
+            if ( iFilterType == TFilterType.EFilterShowAll )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsFree && aCell.Type == HeapCell.TType.EFree )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsAllocated && aCell.Type == HeapCell.TType.EAllocated )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsAllocatedDescriptor && aCell.Type == HeapCell.TType.EAllocated && aCell.IsDescriptor )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsAllocatedByType && aCell.Type == HeapCell.TType.EAllocated )
+            {
+                bool noSymbol = ( iFilterSymbol == null || iFilterSymbol.Address == 0 );
+                bool descriptor = aCell.IsDescriptor;
+                //
+                if ( !descriptor )
+                {
+                    if ( noSymbol && aCell.Symbol == null )
+                    {
+                        ret = true;
+                    }
+                    else if ( iFilterSymbol != null && aCell.Symbol != null )
+                    {
+                        ret = ( aCell.Symbol.Address == iFilterSymbol.Address );
+                    }
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        private TFilterType iFilterType = TFilterType.EFilterShowAll;
+        private Symbol iFilterSymbol = null;
+        private HeapCellArray iCells = new HeapCellArray();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iColumnModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="iTableModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>138, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingFilter.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapUiLib.Controls
+{
+    partial class HeapCellListingFilter
+    {
+        // <summary> 
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary> 
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Component Designer generated code
+
+        // <summary> 
+        // Required method for Designer support - do not modify 
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            this.iCombo_FilterList = new System.Windows.Forms.ComboBox();
+            this.label5 = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // iCombo_FilterList
+            // 
+            this.iCombo_FilterList.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iCombo_FilterList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.iCombo_FilterList.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iCombo_FilterList.FormattingEnabled = true;
+            this.iCombo_FilterList.Location = new System.Drawing.Point( 50, 1 );
+            this.iCombo_FilterList.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iCombo_FilterList.MaxDropDownItems = 50;
+            this.iCombo_FilterList.Name = "iCombo_FilterList";
+            this.iCombo_FilterList.Size = new System.Drawing.Size( 559, 19 );
+            this.iCombo_FilterList.TabIndex = 3;
+            this.iCombo_FilterList.SelectedIndexChanged += new System.EventHandler( this.iCombo_FilterList_SelectedIndexChanged );
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.label5.Location = new System.Drawing.Point( 0, 4 );
+            this.label5.Margin = new System.Windows.Forms.Padding( 0 );
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size( 35, 13 );
+            this.label5.TabIndex = 2;
+            this.label5.Text = "Filter:";
+            this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            // 
+            // HeapCellListingFilter
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add( this.iCombo_FilterList );
+            this.Controls.Add( this.label5 );
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.Margin = new System.Windows.Forms.Padding( 0 );
+            this.MinimumSize = new System.Drawing.Size( 0, 20 );
+            this.Name = "HeapCellListingFilter";
+            this.Size = new System.Drawing.Size( 609, 20 );
+            this.ResumeLayout( false );
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ComboBox iCombo_FilterList;
+        private System.Windows.Forms.Label label5;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingFilter.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.IO;
+using System.Text;
+using SymbianUtils;
+using SymbianStructuresLib.Debug.Symbols;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics;
+using HeapLib.Statistics.Tracking.Base;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapUiLib.Dialogs;
+using HeapUiLib.SubForms;
+using HeapUiLib.Controls;
+using HeapUiLib.Misc;
+
+namespace HeapUiLib.Controls
+{
+    public partial class HeapCellListingFilter : UserControl
+    {
+        #region Events & Delegates
+        public delegate void FilterChangedHandler( TFilterType aFilter, Symbol aSymbolOrNull );
+        public event FilterChangedHandler FilterChanged;
+        #endregion
+
+        #region Constructors & destructor
+        public HeapCellListingFilter()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region Properties
+        [Browsable(false)]
+        public HeapStatistics Statistics
+        {
+            get { return iStatistics; }
+            set
+            {
+                iStatistics = value;
+                UpdateList();
+            }
+        }
+
+        [Browsable( false )]
+        public TFilterType FilterType
+        {
+            get
+            {
+                TrackingInfoCaptioner captioner = new TrackingInfoCaptioner( "All Items", TFilterType.EFilterShowAll );
+                //
+                if ( iCombo_FilterList.SelectedItem != null )
+                {
+                    captioner = (TrackingInfoCaptioner) iCombo_FilterList.SelectedItem;
+                }
+                //
+                return captioner.FilterType;
+            }
+            set
+            {
+                if ( value != FilterType )
+                {
+                    foreach ( object obj in iCombo_FilterList.Items )
+                    {
+                        TrackingInfoCaptioner captioner = (TrackingInfoCaptioner) obj;
+                        //
+                        if ( captioner.FilterType == value )
+                        {
+                            iCombo_FilterList.SelectedItem = obj;
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iCombo_FilterList_SelectedIndexChanged( object sender, EventArgs e )
+        {
+            TrackingInfoCaptioner captioner = (TrackingInfoCaptioner) iCombo_FilterList.SelectedItem;
+            //
+            if ( FilterChanged != null && !captioner.IsSymbolBasedAllocationEntry )
+            {
+                FilterChanged( captioner.FilterType, null );
+            }
+            else if ( FilterChanged != null )
+            {
+                FilterChanged( captioner.FilterType, captioner.Symbol );
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateList()
+        {
+            // Setup combo box filter
+            iCombo_FilterList.BeginUpdate();
+            iCombo_FilterList.Items.Clear();
+
+            // Sort the items by count. This will keep us in sync with
+            // our 'items' collection.
+            Statistics.StatsAllocated.TrackerSymbols.SortByCount();
+
+            // Add standard items
+            iCombo_FilterList.Items.Add( new TrackingInfoCaptioner( "Show All", TFilterType.EFilterShowAll ) );
+            iCombo_FilterList.Items.Add( new TrackingInfoCaptioner( String.Format( "[FR] [{0:d5}] [{1:d8}] Free Cells", Statistics.StatsFree.TypeCount, Statistics.StatsFree.TypeSize ), TFilterType.EFilterShowCellsFree ) );
+            iCombo_FilterList.Items.Add( new TrackingInfoCaptioner( String.Format( "[AA] [{0:d5}] [{1:d8}] Allocations", Statistics.StatsAllocated.TypeCount, Statistics.StatsAllocated.TypeSize ), TFilterType.EFilterShowCellsAllocated ) );
+            iCombo_FilterList.Items.Add( new TrackingInfoCaptioner( String.Format( "[AD] [{0:d5}] [{1:d8}] Descriptors", Statistics.StatsAllocated.TrackerDescriptors.AssociatedCellCount, Statistics.StatsAllocated.TrackerDescriptors.AssociatedMemory ), TFilterType.EFilterShowCellsAllocatedDescriptor ) );
+            foreach ( TrackingInfo info in Statistics.StatsAllocated.TrackerSymbols )
+            {
+                iCombo_FilterList.Items.Add( new TrackingInfoCaptioner( info ) );
+            }
+
+            // Make sure "show all" is selected
+            iCombo_FilterList.SelectedIndex = 0;
+            iCombo_FilterList.EndUpdate();
+        }
+        #endregion
+
+        #region Data members
+        private HeapStatistics iStatistics = new HeapStatistics();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellListingFilter.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellRelationshipControl.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,314 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapUiLib.Controls
+{
+    partial class HeapCellRelationshipControl
+    {
+        // <summary> 
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary> 
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Component Designer generated code
+
+        // <summary> 
+        // Required method for Designer support - do not modify 
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            HeapLib.Statistics.HeapStatistics heapStatistics1 = new HeapLib.Statistics.HeapStatistics();
+            XPTable.Models.DataSourceColumnBinder dataSourceColumnBinder1 = new XPTable.Models.DataSourceColumnBinder();
+            HeapLib.Array.HeapCellArray heapCellArray1 = new HeapLib.Array.HeapCellArray();
+            this.iTLP = new System.Windows.Forms.TableLayoutPanel();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.iCellFilter = new HeapUiLib.Controls.HeapCellListingFilter();
+            this.iTable = new XPTable.Models.Table();
+            this.iCM_Cells = new XPTable.Models.ColumnModel();
+            this.iCol_Type = new XPTable.Models.TextColumn();
+            this.iCol_Address = new XPTable.Models.TextColumn();
+            this.iCol_Length = new XPTable.Models.TextColumn();
+            this.iCol_ReferencedBy = new XPTable.Models.TextColumn();
+            this.iCol_EmbeddedReferencesTo = new XPTable.Models.TextColumn();
+            this.iCol_Symbol = new XPTable.Models.TextColumn();
+            this.iTM_Cells = new XPTable.Models.TableModel();
+            this.iGP_AssociatedWith = new System.Windows.Forms.GroupBox();
+            this.iAssociatedWith = new HeapUiLib.Controls.HeapCellListingControl();
+            this.iCol_Index = new XPTable.Models.TextColumn();
+            this.iRB_ReferencedBy = new System.Windows.Forms.RadioButton();
+            this.iRB_EmbeddedReferencesTo = new System.Windows.Forms.RadioButton();
+            this.iTLP.SuspendLayout();
+            this.groupBox1.SuspendLayout();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).BeginInit();
+            this.iGP_AssociatedWith.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // iTLP
+            // 
+            this.iTLP.ColumnCount = 1;
+            this.iTLP.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iTLP.Controls.Add( this.groupBox1, 0, 0 );
+            this.iTLP.Controls.Add( this.iGP_AssociatedWith, 0, 2 );
+            this.iTLP.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTLP.Location = new System.Drawing.Point( 0, 0 );
+            this.iTLP.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iTLP.Name = "iTLP";
+            this.iTLP.RowCount = 3;
+            this.iTLP.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 50F ) );
+            this.iTLP.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Absolute, 10F ) );
+            this.iTLP.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 50F ) );
+            this.iTLP.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Absolute, 20F ) );
+            this.iTLP.Size = new System.Drawing.Size( 603, 538 );
+            this.iTLP.TabIndex = 0;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add( this.iCellFilter );
+            this.groupBox1.Controls.Add( this.iTable );
+            this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.groupBox1.Location = new System.Drawing.Point( 3, 3 );
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size( 597, 258 );
+            this.groupBox1.TabIndex = 0;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "Cells";
+            // 
+            // iCellFilter
+            // 
+            this.iCellFilter.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iCellFilter.FilterType = HeapUiLib.Controls.TFilterType.EFilterShowAll;
+            this.iCellFilter.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iCellFilter.Location = new System.Drawing.Point( 10, 16 );
+            this.iCellFilter.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iCellFilter.MinimumSize = new System.Drawing.Size( 0, 20 );
+            this.iCellFilter.Name = "iCellFilter";
+            this.iCellFilter.Size = new System.Drawing.Size( 578, 20 );
+            heapStatistics1.HeapBaseAddress = ( (uint) ( 4294967295u ) );
+            heapStatistics1.HeapSize = ( (uint) ( 1u ) );
+            this.iCellFilter.Statistics = heapStatistics1;
+            this.iCellFilter.TabIndex = 1;
+            this.iCellFilter.FilterChanged += new HeapUiLib.Controls.HeapCellListingFilter.FilterChangedHandler( this.iCellFilter_FilterChanged );
+            // 
+            // iTable
+            // 
+            this.iTable.AlternatingRowColor = System.Drawing.Color.Gainsboro;
+            this.iTable.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iTable.BorderColor = System.Drawing.Color.Black;
+            this.iTable.ColumnModel = this.iCM_Cells;
+            this.iTable.DataMember = null;
+            this.iTable.DataSourceColumnBinder = dataSourceColumnBinder1;
+            this.iTable.EnableToolTips = true;
+            this.iTable.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable.FullRowSelect = true;
+            this.iTable.HeaderFont = new System.Drawing.Font( "Tahoma", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable.Location = new System.Drawing.Point( 10, 39 );
+            this.iTable.Name = "iTable";
+            this.iTable.NoItemsText = "No Cells";
+            this.iTable.NoItemsTextColor = System.Drawing.SystemColors.ControlText;
+            this.iTable.NoItemsTextFont = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable.Size = new System.Drawing.Size( 578, 209 );
+            this.iTable.TabIndex = 0;
+            this.iTable.TableModel = this.iTM_Cells;
+            this.iTable.Text = "table1";
+            this.iTable.UnfocusedBorderColor = System.Drawing.Color.Black;
+            this.iTable.UnfocusedSelectionBackColor = System.Drawing.SystemColors.Desktop;
+            this.iTable.UnfocusedSelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            this.iTable.PrepareForSort += new XPTable.Events.SortEventHandler( this.iTable_PrepareForSort );
+            this.iTable.DoubleClick += new System.EventHandler( this.iTable_DoubleClick );
+            this.iTable.SelectionChanged += new XPTable.Events.SelectionEventHandler( this.iTable_SelectionChanged );
+            // 
+            // iCM_Cells
+            // 
+            this.iCM_Cells.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iCol_Type,
+            this.iCol_Address,
+            this.iCol_Length,
+            this.iCol_ReferencedBy,
+            this.iCol_EmbeddedReferencesTo,
+            this.iCol_Symbol} );
+            // 
+            // iCol_Type
+            // 
+            this.iCol_Type.ContentWidth = 29;
+            this.iCol_Type.Text = "Type";
+            this.iCol_Type.Width = 85;
+            // 
+            // iCol_Address
+            // 
+            this.iCol_Address.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_Address.ContentWidth = 46;
+            this.iCol_Address.Text = "Address";
+            this.iCol_Address.Width = 85;
+            // 
+            // iCol_Length
+            // 
+            this.iCol_Length.Alignment = XPTable.Models.ColumnAlignment.Right;
+            this.iCol_Length.ContentWidth = 39;
+            this.iCol_Length.Text = "Length";
+            this.iCol_Length.Width = 85;
+            // 
+            // iCol_ReferencedBy
+            // 
+            this.iCol_ReferencedBy.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_ReferencedBy.ContentWidth = 41;
+            this.iCol_ReferencedBy.Text = "Ref. By";
+            this.iCol_ReferencedBy.Width = 85;
+            // 
+            // iCol_EmbeddedReferencesTo
+            // 
+            this.iCol_EmbeddedReferencesTo.Alignment = XPTable.Models.ColumnAlignment.Right;
+            this.iCol_EmbeddedReferencesTo.ContentWidth = 41;
+            this.iCol_EmbeddedReferencesTo.Text = "Ref. To";
+            this.iCol_EmbeddedReferencesTo.Width = 85;
+            // 
+            // iCol_Symbol
+            // 
+            this.iCol_Symbol.ContentWidth = 70;
+            this.iCol_Symbol.Text = "Object Name";
+            this.iCol_Symbol.Width = 350;
+            // 
+            // iGP_AssociatedWith
+            // 
+            this.iGP_AssociatedWith.Controls.Add( this.iRB_EmbeddedReferencesTo );
+            this.iGP_AssociatedWith.Controls.Add( this.iRB_ReferencedBy );
+            this.iGP_AssociatedWith.Controls.Add( this.iAssociatedWith );
+            this.iGP_AssociatedWith.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iGP_AssociatedWith.Location = new System.Drawing.Point( 3, 277 );
+            this.iGP_AssociatedWith.Name = "iGP_AssociatedWith";
+            this.iGP_AssociatedWith.Size = new System.Drawing.Size( 597, 258 );
+            this.iGP_AssociatedWith.TabIndex = 1;
+            this.iGP_AssociatedWith.TabStop = false;
+            this.iGP_AssociatedWith.Text = "Associated with...";
+            // 
+            // iAssociatedWith
+            // 
+            this.iAssociatedWith.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iAssociatedWith.Cells = heapCellArray1;
+            this.iAssociatedWith.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iAssociatedWith.Location = new System.Drawing.Point( 10, 46 );
+            this.iAssociatedWith.Name = "iAssociatedWith";
+            this.iAssociatedWith.SelectedCell = null;
+            this.iAssociatedWith.Size = new System.Drawing.Size( 578, 202 );
+            this.iAssociatedWith.TabIndex = 0;
+            // 
+            // iCol_Index
+            // 
+            this.iCol_Index.ContentWidth = 0;
+            // 
+            // iRB_ReferencedBy
+            // 
+            this.iRB_ReferencedBy.AutoSize = true;
+            this.iRB_ReferencedBy.Checked = true;
+            this.iRB_ReferencedBy.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iRB_ReferencedBy.Location = new System.Drawing.Point( 10, 20 );
+            this.iRB_ReferencedBy.Name = "iRB_ReferencedBy";
+            this.iRB_ReferencedBy.Size = new System.Drawing.Size( 96, 17 );
+            this.iRB_ReferencedBy.TabIndex = 1;
+            this.iRB_ReferencedBy.TabStop = true;
+            this.iRB_ReferencedBy.Text = "Referenced By";
+            this.iRB_ReferencedBy.UseVisualStyleBackColor = true;
+            this.iRB_ReferencedBy.CheckedChanged += new System.EventHandler( this.iRB_Type_CheckedChanged );
+            // 
+            // iRB_EmbeddedReferencesTo
+            // 
+            this.iRB_EmbeddedReferencesTo.AutoSize = true;
+            this.iRB_EmbeddedReferencesTo.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iRB_EmbeddedReferencesTo.Location = new System.Drawing.Point( 136, 20 );
+            this.iRB_EmbeddedReferencesTo.Name = "iRB_EmbeddedReferencesTo";
+            this.iRB_EmbeddedReferencesTo.Size = new System.Drawing.Size( 148, 17 );
+            this.iRB_EmbeddedReferencesTo.TabIndex = 1;
+            this.iRB_EmbeddedReferencesTo.Text = "Embedded References To";
+            this.iRB_EmbeddedReferencesTo.UseVisualStyleBackColor = true;
+            this.iRB_EmbeddedReferencesTo.CheckedChanged += new System.EventHandler( this.iRB_Type_CheckedChanged );
+            // 
+            // HeapCellRelationshipControl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add( this.iTLP );
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.Name = "HeapCellRelationshipControl";
+            this.Size = new System.Drawing.Size( 603, 538 );
+            this.iTLP.ResumeLayout( false );
+            this.groupBox1.ResumeLayout( false );
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).EndInit();
+            this.iGP_AssociatedWith.ResumeLayout( false );
+            this.iGP_AssociatedWith.PerformLayout();
+            this.ResumeLayout( false );
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.TableLayoutPanel iTLP;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private XPTable.Models.Table iTable;
+        private System.Windows.Forms.GroupBox iGP_AssociatedWith;
+        private XPTable.Models.TableModel iTM_Cells;
+        private XPTable.Models.ColumnModel iCM_Cells;
+        private XPTable.Models.TextColumn iCol_Type;
+        private XPTable.Models.TextColumn iCol_Address;
+        private XPTable.Models.TextColumn iCol_Length;
+        private XPTable.Models.TextColumn iCol_Symbol;
+        private XPTable.Models.TextColumn iCol_Index;
+        private XPTable.Models.TextColumn iCol_ReferencedBy;
+        private XPTable.Models.TextColumn iCol_EmbeddedReferencesTo;
+        private HeapCellListingControl iAssociatedWith;
+        private HeapCellListingFilter iCellFilter;
+        private System.Windows.Forms.RadioButton iRB_EmbeddedReferencesTo;
+        private System.Windows.Forms.RadioButton iRB_ReferencedBy;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellRelationshipControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,416 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Windows.Forms;
+using System.Text;
+using SymbianStructuresLib.Debug.Symbols;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Statistics;
+
+namespace HeapUiLib.Controls
+{
+    public partial class HeapCellRelationshipControl : UserControl
+    {
+        #region Enumerations
+        public enum TListMode
+        {
+            EListModeEmbeddedReferences = 0,
+            EListModeReferencedBy
+        }
+        #endregion
+
+        #region Constructors & destructor
+        public HeapCellRelationshipControl()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region API
+        public void SetFilter( TFilterType aType )
+        {
+            SetFilter( aType, null );
+        }
+
+        public void SetFilter( TFilterType aType, Symbol aSymbol )
+        {
+            iFilterType = aType;
+            iFilterSymbol = aSymbol;
+            iCellFilter.FilterType = aType;
+            //
+            UpdateListView();
+        }
+
+        public void CopySelectedDataToClipboard()
+        {
+            StringBuilder clipboardText = new StringBuilder();
+
+            // Get columns
+            foreach ( XPTable.Models.Column column in iTable.ColumnModel.Columns )
+            {
+                clipboardText.Append( column.Text + "\t" );
+            }
+            clipboardText.Append( System.Environment.NewLine );
+
+            // Do underline (there must be a better way!)
+            int len = clipboardText.Length;
+            for ( int i = 0; i < len; i++ )
+            {
+                clipboardText.Append( "=" );
+            }
+            clipboardText.Append( System.Environment.NewLine );
+
+            // Get cell values
+            foreach ( XPTable.Models.Row row in iTable.SelectedItems )
+            {
+                foreach ( XPTable.Models.Cell cell in row.Cells )
+                {
+                    string text = cell.Text;
+                    clipboardText.Append( text + "\t" );
+                }
+                //
+                clipboardText.Append( System.Environment.NewLine );
+            }
+            //
+            Clipboard.SetDataObject( clipboardText.ToString(), true );
+        }
+        #endregion
+
+        #region Properties
+        [Browsable( false )]
+        public HeapStatistics Statistics
+        {
+            get { return iCellFilter.Statistics; }
+            set { iCellFilter.Statistics = value; }
+        }
+
+        [Browsable( false )]
+        public HeapCell SelectedCell
+        {
+            get
+            {
+                HeapCell cell = null;
+                //
+                if ( iTable.SelectedItems.Length > 0 )
+                {
+                    int index = iTable.SelectedIndicies[ 0 ];
+                    cell = iTable.TableModel.Rows[ index ].Tag as HeapCell;
+                }
+                //
+                return cell;
+            }
+            set
+            {
+                foreach ( XPTable.Models.Row row in iTable.TableModel.Rows )
+                {
+                    HeapCell cell = (HeapCell) row.Tag;
+                    //
+                    if ( cell.Address == value.Address )
+                    {
+                        iTable.Select();
+                        iTable.Focus();
+                        iTable.TableModel.Selections.Clear();
+                        iTable.TableModel.Selections.AddCell( row.Index, 0 );
+                        iTable.EnsureVisible( row.Index, 0 );
+                        break;
+                    }
+                }
+            }
+        }
+
+        [Browsable( false )]
+        public HeapCellArray Cells
+        {
+            get { return iCells; }
+            set
+            {
+                iCells = value;
+                UpdateListView();
+            }
+        }
+
+        public TListMode ListMode
+        {
+            get
+            {
+                TListMode ret = TListMode.EListModeReferencedBy;
+                //
+                if ( iRB_EmbeddedReferencesTo.Checked )
+                {
+                    ret = TListMode.EListModeEmbeddedReferences;
+                }
+                //
+                return ret;
+            }
+            set
+            {
+                if ( value == TListMode.EListModeEmbeddedReferences )
+                {
+                    iRB_EmbeddedReferencesTo.Checked = true;
+                }
+                else
+                {
+                    iRB_ReferencedBy.Checked = true;
+                }
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iTable_DoubleClick( object sender, EventArgs e )
+        {
+            OnDoubleClick( e );
+        }
+
+        private void iTable_PrepareForSort( object sender, XPTable.Events.SortEventArgs e )
+        {
+            if ( e.Column == iCol_Length )
+            {
+                e.Comparer = new XPTable.Sorting.NumberComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+            else if ( e.Column == iCol_ReferencedBy )
+            {
+                e.Comparer = new XPTable.Sorting.NumberComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+            else if ( e.Column == iCol_EmbeddedReferencesTo )
+            {
+                e.Comparer = new XPTable.Sorting.NumberComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+            else
+            {
+                e.Comparer = new XPTable.Sorting.TextComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+        }
+
+        private void iTable_SelectionChanged( object sender, XPTable.Events.SelectionEventArgs e )
+        {
+            if ( e.NewSelectedIndicies.Length > 0 )
+            {
+                int rowIndex = e.NewSelectedIndicies[ 0 ];
+                XPTable.Models.Row row = e.TableModel.Rows[ rowIndex ];
+                HeapCell cell = (HeapCell) row.Tag;
+                UpdateReferenceInfoList( cell );
+            }
+        }
+
+        private void iCellFilter_FilterChanged( TFilterType aFilter, Symbol aSymbolOrNull )
+        {
+            SetFilter( aFilter, aSymbolOrNull );
+        }
+
+        private void iRB_Type_CheckedChanged( object sender, EventArgs e )
+        {
+            if ( iTable.SelectedItems.Length > 0 )
+            {
+                HeapCell cell = (HeapCell) iTable.SelectedItems[ 0 ].Tag;
+                UpdateReferenceInfoList( cell );
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateListView()
+        {
+            iTable.BeginUpdate();
+            iTable.TableModel.Rows.Clear();
+            //
+            foreach ( HeapCell cell in Cells )
+            {
+                // Check whether the filter permits this item to be included.
+                if ( CheckAgainstFilter( cell ) )
+                {
+                    RelationshipManager relManager = cell.RelationshipManager;
+
+                    XPTable.Models.Row row = new XPTable.Models.Row();
+                    row.Tag = cell;
+                    //
+                    XPTable.Models.Cell cellType = new XPTable.Models.Cell( " " + cell.TypeString );
+                    if ( cell.Type == HeapCell.TType.EAllocated )
+                    {
+                        if ( cell.IsDescriptor )
+                        {
+                            cellType.ForeColor = Color.DarkGoldenrod;
+                            cellType.ToolTipText = "Descriptor";
+                        }
+                        else
+                        {
+                            cellType.ForeColor = Color.Red;
+                        }
+                    }
+                    else if ( cell.Type == HeapCell.TType.EFree )
+                    {
+                        cellType.ForeColor = Color.Blue;
+                    }
+                    row.Cells.Add( cellType );
+                    row.Cells.Add( new XPTable.Models.Cell( "0x" + cell.Address.ToString( "x8" ) ) );
+
+                    // Must initialise "data" in order for sorting to work (XPTable's numeric sorter relies upon it).
+                    XPTable.Models.Cell cellLength = new XPTable.Models.Cell( cell.Length.ToString() );
+                    cellLength.Data = cell.Length;
+                    row.Cells.Add( cellLength );
+
+                    // Reference by
+                    XPTable.Models.Cell cellRefBy = new XPTable.Models.Cell( relManager.ReferencedBy.Count.ToString() );
+                    cellRefBy.Data = relManager.ReferencedBy.Count;
+                    row.Cells.Add( cellRefBy );
+
+                    // Embedded references to
+                    XPTable.Models.Cell cellEmbeddedRefsTo = new XPTable.Models.Cell( relManager.EmbeddedReferencesTo.Count.ToString() );
+                    cellEmbeddedRefsTo.Data = relManager.EmbeddedReferencesTo.Count;
+                    row.Cells.Add( cellEmbeddedRefsTo );
+
+                    // Payload column
+                    if ( cell.IsDescriptor )
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( cell.DescriptorText ) );
+                    }
+                    else if ( cell.Symbol != null )
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( cell.SymbolString ) );
+                    }
+                    else
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( cell.RawItems.FirstLine ) );
+                    }
+                    //
+                    iTable.TableModel.Rows.Add( row );
+                }
+            }
+
+            // Must sort if the user had previously selected a sort column
+            if ( iTable.IsValidColumn( iTable.SortingColumn ) )
+            {
+                iTable.Sort();
+            }
+
+            // Done - end transaction & redraw
+            iTable.EndUpdate();
+        }
+
+        private void UpdateReferenceInfoList( HeapCell aCell )
+        {
+            RelationshipManager relManager = aCell.RelationshipManager;
+            //
+            if ( aCell.Symbol != null )
+            {
+                iGP_AssociatedWith.Text = "[0x" + aCell.Address + "] " + aCell.SymbolString;
+            }
+            else
+            {
+                iGP_AssociatedWith.Text = "[0x" + aCell.Address + "]";
+            }
+
+            //
+            if ( iRB_EmbeddedReferencesTo.Checked )
+            {
+                HeapCellArray array = new HeapCellArray();
+                foreach ( RelationshipInfo info in relManager.EmbeddedReferencesTo )
+                {
+                    array.Add( info.ToCell );
+                }
+                //
+                iAssociatedWith.Cells = array;
+            }
+            else
+            {
+                HeapCellArray array = new HeapCellArray();
+                foreach ( HeapCell refCell in relManager.ReferencedBy )
+                {
+                    array.Add( refCell );
+                }
+                //
+                iAssociatedWith.Cells = array;
+            }
+        }
+
+        private bool CheckAgainstFilter( HeapCell aCell )
+        {
+            bool ret = false;
+            //
+            if ( iFilterType == TFilterType.EFilterShowAll )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsFree && aCell.Type == HeapCell.TType.EFree )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsAllocated && aCell.Type == HeapCell.TType.EAllocated )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsAllocatedDescriptor && aCell.Type == HeapCell.TType.EAllocated && aCell.IsDescriptor )
+            {
+                ret = true;
+            }
+            else if ( iFilterType == TFilterType.EFilterShowCellsAllocatedByType && aCell.Type == HeapCell.TType.EAllocated )
+            {
+                bool noSymbol = ( iFilterSymbol == null || iFilterSymbol.Address == 0 );
+                bool descriptor = aCell.IsDescriptor;
+                //
+                if ( !descriptor )
+                {
+                    if ( noSymbol && aCell.Symbol == null )
+                    {
+                        ret = true;
+                    }
+                    else if ( iFilterSymbol != null && aCell.Symbol != null )
+                    {
+                        ret = ( aCell.Symbol.Address == iFilterSymbol.Address );
+                    }
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        private TFilterType iFilterType = TFilterType.EFilterShowAll;
+        private Symbol iFilterSymbol = null;
+        private HeapCellArray iCells = new HeapCellArray();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellRelationshipControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iCM_Cells.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>227, 17</value>
+  </metadata>
+  <metadata name="iTM_Cells.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>129, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellSizeDistributionControl.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,211 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapUiLib.Controls
+{
+    partial class HeapCellSizeDistributionControl
+    {
+        // <summary> 
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary> 
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Component Designer generated code
+
+        // <summary> 
+        // Required method for Designer support - do not modify 
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            XPTable.Models.DataSourceColumnBinder dataSourceColumnBinder1 = new XPTable.Models.DataSourceColumnBinder();
+            this.iTable = new XPTable.Models.Table();
+            this.iColumnModel = new XPTable.Models.ColumnModel();
+            this.iCol_Size = new XPTable.Models.TextColumn();
+            this.iCol_Count = new XPTable.Models.TextColumn();
+            this.iCol_Total = new XPTable.Models.TextColumn();
+            this.iCol_PercentageOfType = new XPTable.Models.TextColumn();
+            this.iCol_PercentageOfHeap = new XPTable.Models.TextColumn();
+            this.iTableModel = new XPTable.Models.TableModel();
+            this.iGP_Show = new System.Windows.Forms.GroupBox();
+            this.iRB_Free = new System.Windows.Forms.RadioButton();
+            this.iRB_Allocated = new System.Windows.Forms.RadioButton();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).BeginInit();
+            this.iGP_Show.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // iTable
+            // 
+            this.iTable.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iTable.BorderColor = System.Drawing.Color.Black;
+            this.iTable.ColumnModel = this.iColumnModel;
+            this.iTable.DataMember = null;
+            this.iTable.DataSourceColumnBinder = dataSourceColumnBinder1;
+            this.iTable.EnableToolTips = true;
+            this.iTable.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iTable.FullRowSelect = true;
+            this.iTable.HeaderFont = new System.Drawing.Font( "Tahoma", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable.Location = new System.Drawing.Point( 0, 52 );
+            this.iTable.Name = "iTable";
+            this.iTable.NoItemsText = "No Data";
+            this.iTable.NoItemsTextColor = System.Drawing.SystemColors.ControlText;
+            this.iTable.NoItemsTextFont = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable.Size = new System.Drawing.Size( 517, 130 );
+            this.iTable.TabIndex = 0;
+            this.iTable.TableModel = this.iTableModel;
+            this.iTable.UnfocusedBorderColor = System.Drawing.Color.Black;
+            this.iTable.PrepareForSort += new XPTable.Events.SortEventHandler( this.iTable_PrepareForSort );
+            // 
+            // iColumnModel
+            // 
+            this.iColumnModel.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iCol_Size,
+            this.iCol_Count,
+            this.iCol_Total,
+            this.iCol_PercentageOfType,
+            this.iCol_PercentageOfHeap} );
+            // 
+            // iCol_Size
+            // 
+            this.iCol_Size.ContentWidth = 26;
+            this.iCol_Size.Text = "Size";
+            this.iCol_Size.Width = 120;
+            // 
+            // iCol_Count
+            // 
+            this.iCol_Count.ContentWidth = 80;
+            this.iCol_Count.Text = "Instance Count";
+            this.iCol_Count.Width = 90;
+            // 
+            // iCol_Total
+            // 
+            this.iCol_Total.ContentWidth = 29;
+            this.iCol_Total.Text = "Total";
+            this.iCol_Total.Width = 90;
+            // 
+            // iCol_PercentageOfType
+            // 
+            this.iCol_PercentageOfType.ContentWidth = 62;
+            this.iCol_PercentageOfType.Text = "Percentage";
+            // 
+            // iCol_PercentageOfHeap
+            // 
+            this.iCol_PercentageOfHeap.ContentWidth = 100;
+            this.iCol_PercentageOfHeap.Text = "Percentage (Heap)";
+            this.iCol_PercentageOfHeap.Width = 110;
+            // 
+            // iGP_Show
+            // 
+            this.iGP_Show.Controls.Add( this.iRB_Free );
+            this.iGP_Show.Controls.Add( this.iRB_Allocated );
+            this.iGP_Show.Location = new System.Drawing.Point( 0, 0 );
+            this.iGP_Show.Name = "iGP_Show";
+            this.iGP_Show.Size = new System.Drawing.Size( 243, 46 );
+            this.iGP_Show.TabIndex = 1;
+            this.iGP_Show.TabStop = false;
+            this.iGP_Show.Text = "Show...";
+            // 
+            // iRB_Free
+            // 
+            this.iRB_Free.AutoSize = true;
+            this.iRB_Free.Location = new System.Drawing.Point( 139, 20 );
+            this.iRB_Free.Name = "iRB_Free";
+            this.iRB_Free.Size = new System.Drawing.Size( 70, 17 );
+            this.iRB_Free.TabIndex = 0;
+            this.iRB_Free.Text = "Free cells";
+            this.iRB_Free.UseVisualStyleBackColor = true;
+            this.iRB_Free.CheckedChanged += new System.EventHandler( this.iRB_CheckedChanged );
+            // 
+            // iRB_Allocated
+            // 
+            this.iRB_Allocated.AutoSize = true;
+            this.iRB_Allocated.Checked = true;
+            this.iRB_Allocated.Location = new System.Drawing.Point( 22, 20 );
+            this.iRB_Allocated.Name = "iRB_Allocated";
+            this.iRB_Allocated.Size = new System.Drawing.Size( 92, 17 );
+            this.iRB_Allocated.TabIndex = 0;
+            this.iRB_Allocated.TabStop = true;
+            this.iRB_Allocated.Text = "Allocated cells";
+            this.iRB_Allocated.UseVisualStyleBackColor = true;
+            this.iRB_Allocated.CheckedChanged += new System.EventHandler( this.iRB_CheckedChanged );
+            // 
+            // HeapCellSizeDistributionControl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add( this.iGP_Show );
+            this.Controls.Add( this.iTable );
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.Name = "HeapCellSizeDistributionControl";
+            this.Size = new System.Drawing.Size( 517, 182 );
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable ) ).EndInit();
+            this.iGP_Show.ResumeLayout( false );
+            this.iGP_Show.PerformLayout();
+            this.ResumeLayout( false );
+
+        }
+
+        #endregion
+
+        private XPTable.Models.Table iTable;
+        private XPTable.Models.ColumnModel iColumnModel;
+        private XPTable.Models.TableModel iTableModel;
+        private XPTable.Models.TextColumn iCol_Size;
+        private XPTable.Models.TextColumn iCol_Count;
+        private XPTable.Models.TextColumn iCol_PercentageOfType;
+        private XPTable.Models.TextColumn iCol_PercentageOfHeap;
+        private XPTable.Models.TextColumn iCol_Total;
+        private System.Windows.Forms.GroupBox iGP_Show;
+        private System.Windows.Forms.RadioButton iRB_Free;
+        private System.Windows.Forms.RadioButton iRB_Allocated;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellSizeDistributionControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,282 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Windows.Forms;
+using System.Text;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Statistics;
+using HeapLib.Statistics.Distribution;
+using SymbianUtils;
+using XPTable.Models;
+
+namespace HeapUiLib.Controls
+{
+    public partial class HeapCellSizeDistributionControl : UserControl
+    {
+        #region Constructors & destructor
+        public HeapCellSizeDistributionControl()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        [Browsable(false)]
+        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+        public HeapStatistics Statistics
+        {
+            get { return iStats; }
+            set
+            {
+                iStats = value;
+                iRB_CheckedChanged( this, EventArgs.Empty );
+            }
+        }
+        #endregion
+
+        #region Internal properties
+        private HeapCellSizeDistribution Distribution
+        {
+            get { return iDistribution; }
+            set
+            {
+                iDistribution = value;
+                UpdateTable();
+            }
+        }
+
+        private long TotalHeapSize
+        {
+            get
+            {
+                long ret = 1;
+                //
+                if ( Statistics != null )
+                {
+                    ret = Statistics.SizeTotalHeader + Statistics.SizeTotalPayload;
+                }
+                //
+                return ret; 
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateTable()
+        {
+            iTable.BeginUpdate();
+            iTableModel.Rows.Clear();
+            //
+            long total = iDistribution.Total;
+            foreach ( DictionaryEntry entry in iDistribution )
+            {
+                uint size = (uint) ( entry.Key );
+                uint instanceCount = (uint) entry.Value;
+                uint totalForSize = size * instanceCount;
+                double percentageDistribution = ( (double) ( totalForSize ) / ( (double) total ) ) * 100.0;
+                double percentageHeap = ( (double) ( totalForSize ) / ( (double) TotalHeapSize ) ) * 100.0;
+                string percentageTextDistribution = NumberFormattingUtils.NumberAsPercentageTwoDP( totalForSize, total ) + " %";
+                string percentageTextHeap = NumberFormattingUtils.NumberAsPercentageTwoDP( totalForSize, TotalHeapSize ) + " %";
+                //
+                XPTable.Models.Row row = new XPTable.Models.Row();
+                //
+                XPTable.Models.Cell cellSize = new XPTable.Models.Cell( size.ToString() + " bytes" );
+                cellSize.Tag = size;
+                XPTable.Models.Cell cellInstanceCount = new XPTable.Models.Cell( instanceCount.ToString() );
+                cellInstanceCount.Data = instanceCount;
+                XPTable.Models.Cell cellTotalForSize = new XPTable.Models.Cell( totalForSize.ToString() );
+                cellTotalForSize.Data = totalForSize;
+                XPTable.Models.Cell cellPercentage = new XPTable.Models.Cell( percentageTextDistribution );
+                cellPercentage.Tag = percentageDistribution;
+                XPTable.Models.Cell cellPercentageOfHeap = new XPTable.Models.Cell( percentageTextHeap );
+                cellPercentageOfHeap.Tag = percentageHeap;
+                //
+                row.Cells.Add( cellSize );
+                row.Cells.Add( cellInstanceCount );
+                row.Cells.Add( cellTotalForSize );
+                row.Cells.Add( cellPercentage );
+                row.Cells.Add( cellPercentageOfHeap );
+                //
+                iTableModel.Rows.Add( row );
+            }
+            //
+            iTable.EndUpdate();
+        }
+        #endregion
+
+        #region Event handlers
+        private void iTable_PrepareForSort( object sender, XPTable.Events.SortEventArgs e )
+        {
+            if ( e.Column == iCol_Count || e.Column == iCol_Total )
+            {
+                e.Comparer = new XPTable.Sorting.NumberComparer( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+            else if ( e.Column == iCol_Size )
+            {
+                e.Comparer = new HeapCellDistributionCustomComparerUint( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+            else
+            {
+                e.Comparer = new HeapCellDistributionCustomComparerDouble( iTable.TableModel, e.Index, e.Column.SortOrder );
+            }
+        }
+
+        private void iRB_CheckedChanged( object sender, EventArgs e )
+        {
+            if ( iRB_Allocated.Checked )
+            {
+                Distribution = Statistics.StatsAllocated.Distribution;
+            }
+            else if ( iRB_Free.Checked )
+            {
+                Distribution = Statistics.StatsFree.Distribution;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private HeapStatistics iStats = null;
+        private HeapCellSizeDistribution iDistribution = new HeapCellSizeDistribution();
+        #endregion
+    }
+
+    #region Internal classes
+    internal class HeapCellDistributionCustomComparerUint : XPTable.Sorting.ComparerBase
+    {
+        #region Constructors & destructor
+        public HeapCellDistributionCustomComparerUint( TableModel aModel, int aColumn, SortOrder aSortOrder )
+            : base( aModel, aColumn, aSortOrder )
+        {
+        }
+        #endregion
+
+        #region From ComparerBase
+        protected override int CompareCells( XPTable.Models.Cell cell1, XPTable.Models.Cell cell2 )
+        {
+            // check for null cells
+            if ( cell1 == null && cell2 == null )
+            {
+                return 0;
+            }
+            else if ( cell1 == null )
+            {
+                return -1;
+            }
+            else if ( cell2 == null )
+            {
+                return 1;
+            }
+
+            if ( cell1.Tag == null && cell2.Tag == null )
+            {
+                return 0;
+            }
+            else if ( cell1.Tag == null )
+            {
+                return -1;
+            }
+            else if ( cell2.Tag == null )
+            {
+                return 1;
+            }
+
+            uint cell1Val = (uint) cell1.Tag;
+            uint cell2Val = (uint) cell2.Tag;
+
+            return cell1Val.CompareTo( cell2Val );
+        }
+        #endregion
+    }
+
+    internal class HeapCellDistributionCustomComparerDouble : XPTable.Sorting.ComparerBase
+    {
+        #region Constructors & destructor
+        public HeapCellDistributionCustomComparerDouble( TableModel aModel, int aColumn, SortOrder aSortOrder )
+            : base( aModel, aColumn, aSortOrder )
+        {
+        }
+        #endregion
+
+        #region From ComparerBase
+        protected override int CompareCells( XPTable.Models.Cell cell1, XPTable.Models.Cell cell2 )
+        {
+            // check for null cells
+            if ( cell1 == null && cell2 == null )
+            {
+                return 0;
+            }
+            else if ( cell1 == null )
+            {
+                return -1;
+            }
+            else if ( cell2 == null )
+            {
+                return 1;
+            }
+
+            if ( cell1.Tag == null && cell2.Tag == null )
+            {
+                return 0;
+            }
+            else if ( cell1.Tag == null )
+            {
+                return -1;
+            }
+            else if ( cell2.Tag == null )
+            {
+                return 1;
+            }
+
+            double cell1Val = (double) cell1.Tag;
+            double cell2Val = (double) cell2.Tag;
+
+            return cell1Val.CompareTo( cell2Val );
+        }
+        #endregion
+    }
+    #endregion
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellSizeDistributionControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iColumnModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>128, 17</value>
+  </metadata>
+  <metadata name="iTableModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellStatsControl.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,298 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapUiLib.Controls
+{
+    partial class HeapCellStatsControl
+    {
+        // <summary> 
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary> 
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Component Designer generated code
+
+        // <summary> 
+        // Required method for Designer support - do not modify 
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup( "Cell Counts", System.Windows.Forms.HorizontalAlignment.Left );
+            System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup( "Memory", System.Windows.Forms.HorizontalAlignment.Left );
+            System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup( "Totals", System.Windows.Forms.HorizontalAlignment.Left );
+            System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Number of allocated cells:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem2 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Number of free cells:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Memory for items matching symbols:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem4 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Memory for other allocations:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem5 = new System.Windows.Forms.ListViewItem( "" );
+            System.Windows.Forms.ListViewItem listViewItem6 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Total consumed by allocated cells:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem7 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Total consumed by free cells:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem8 = new System.Windows.Forms.ListViewItem( "" );
+            System.Windows.Forms.ListViewItem listViewItem9 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Heap cell header overhead size:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem10 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Selection total:",
+            "",
+            ""}, -1 );
+            System.Windows.Forms.ListViewItem listViewItem11 = new System.Windows.Forms.ListViewItem( new string[] {
+            "Total allocated memory for heap cells:",
+            "",
+            ""}, -1 );
+            XPTable.Models.DataSourceColumnBinder dataSourceColumnBinder1 = new XPTable.Models.DataSourceColumnBinder();
+            this.iLV_Summary = new System.Windows.Forms.ListView();
+            this.iColItem = new System.Windows.Forms.ColumnHeader();
+            this.iColTotal = new System.Windows.Forms.ColumnHeader();
+            this.iColPercentage = new System.Windows.Forms.ColumnHeader();
+            this.iTable_SymbolMemory = new XPTable.Models.Table();
+            this.iColumnModel_SymbolMemory = new XPTable.Models.ColumnModel();
+            this.iTab2_ColModel_Stats_Col_Symbol = new XPTable.Models.TextColumn();
+            this.iTab2_ColModel_Stats_Col_AllocationCount = new XPTable.Models.TextColumn();
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance = new XPTable.Models.TextColumn();
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory = new XPTable.Models.TextColumn();
+            this.iTableModel_SymbolMemory = new XPTable.Models.TableModel();
+            this.iTLP = new System.Windows.Forms.TableLayoutPanel();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable_SymbolMemory ) ).BeginInit();
+            this.iTLP.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // iLV_Summary
+            // 
+            this.iLV_Summary.Columns.AddRange( new System.Windows.Forms.ColumnHeader[] {
+            this.iColItem,
+            this.iColTotal,
+            this.iColPercentage} );
+            this.iLV_Summary.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iLV_Summary.FullRowSelect = true;
+            this.iLV_Summary.GridLines = true;
+            listViewGroup1.Header = "Cell Counts";
+            listViewGroup1.Name = "iLVGP_CellCounts";
+            listViewGroup2.Header = "Memory";
+            listViewGroup2.Name = "iLVGP_Memory";
+            listViewGroup3.Header = "Totals";
+            listViewGroup3.Name = "iLVGP_Totals";
+            this.iLV_Summary.Groups.AddRange( new System.Windows.Forms.ListViewGroup[] {
+            listViewGroup1,
+            listViewGroup2,
+            listViewGroup3} );
+            this.iLV_Summary.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
+            listViewItem1.Group = listViewGroup1;
+            listViewItem2.Group = listViewGroup1;
+            listViewItem3.Group = listViewGroup2;
+            listViewItem4.Group = listViewGroup2;
+            listViewItem5.Group = listViewGroup2;
+            listViewItem6.Group = listViewGroup2;
+            listViewItem7.Group = listViewGroup2;
+            listViewItem8.Group = listViewGroup2;
+            listViewItem9.Group = listViewGroup2;
+            listViewItem10.Group = listViewGroup3;
+            listViewItem11.Group = listViewGroup3;
+            this.iLV_Summary.Items.AddRange( new System.Windows.Forms.ListViewItem[] {
+            listViewItem1,
+            listViewItem2,
+            listViewItem3,
+            listViewItem4,
+            listViewItem5,
+            listViewItem6,
+            listViewItem7,
+            listViewItem8,
+            listViewItem9,
+            listViewItem10,
+            listViewItem11} );
+            this.iLV_Summary.Location = new System.Drawing.Point( 578, 0 );
+            this.iLV_Summary.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iLV_Summary.Name = "iLV_Summary";
+            this.iLV_Summary.Scrollable = false;
+            this.iLV_Summary.Size = new System.Drawing.Size( 353, 293 );
+            this.iLV_Summary.TabIndex = 4;
+            this.iLV_Summary.UseCompatibleStateImageBehavior = false;
+            this.iLV_Summary.View = System.Windows.Forms.View.Details;
+            // 
+            // iColItem
+            // 
+            this.iColItem.Text = "";
+            this.iColItem.Width = 190;
+            // 
+            // iColTotal
+            // 
+            this.iColTotal.Text = "Total";
+            this.iColTotal.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.iColTotal.Width = 105;
+            // 
+            // iColPercentage
+            // 
+            this.iColPercentage.Text = "%";
+            this.iColPercentage.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            // 
+            // iTable_SymbolMemory
+            // 
+            this.iTable_SymbolMemory.BorderColor = System.Drawing.Color.Black;
+            this.iTable_SymbolMemory.ColumnModel = this.iColumnModel_SymbolMemory;
+            this.iTable_SymbolMemory.DataMember = null;
+            this.iTable_SymbolMemory.DataSourceColumnBinder = dataSourceColumnBinder1;
+            this.iTable_SymbolMemory.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTable_SymbolMemory.EditStartAction = XPTable.Editors.EditStartAction.CustomKey;
+            this.iTable_SymbolMemory.FullRowSelect = true;
+            this.iTable_SymbolMemory.GridLines = XPTable.Models.GridLines.Rows;
+            this.iTable_SymbolMemory.HeaderFont = new System.Drawing.Font( "Tahoma", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable_SymbolMemory.Location = new System.Drawing.Point( 0, 0 );
+            this.iTable_SymbolMemory.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iTable_SymbolMemory.MultiSelect = true;
+            this.iTable_SymbolMemory.Name = "iTable_SymbolMemory";
+            this.iTable_SymbolMemory.NoItemsText = "Statistics Unavailable";
+            this.iTable_SymbolMemory.NoItemsTextColor = System.Drawing.SystemColors.ControlText;
+            this.iTable_SymbolMemory.NoItemsTextFont = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iTable_SymbolMemory.SelectionStyle = XPTable.Models.SelectionStyle.Grid;
+            this.iTable_SymbolMemory.Size = new System.Drawing.Size( 574, 293 );
+            this.iTable_SymbolMemory.TabIndex = 6;
+            this.iTable_SymbolMemory.TableModel = this.iTableModel_SymbolMemory;
+            this.iTable_SymbolMemory.UnfocusedBorderColor = System.Drawing.Color.Black;
+            this.iTable_SymbolMemory.PrepareForSort += new XPTable.Events.SortEventHandler( this.iPG3_StatsTable_PrepareForSort );
+            this.iTable_SymbolMemory.SelectionChanged += new XPTable.Events.SelectionEventHandler( this.iPG3_StatsTable_SelectionChanged );
+            // 
+            // iColumnModel_SymbolMemory
+            // 
+            this.iColumnModel_SymbolMemory.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iTab2_ColModel_Stats_Col_Symbol,
+            this.iTab2_ColModel_Stats_Col_AllocationCount,
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance,
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory} );
+            // 
+            // iTab2_ColModel_Stats_Col_Symbol
+            // 
+            this.iTab2_ColModel_Stats_Col_Symbol.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_Symbol.Text = "Symbol";
+            this.iTab2_ColModel_Stats_Col_Symbol.Width = 270;
+            // 
+            // iTab2_ColModel_Stats_Col_AllocationCount
+            // 
+            this.iTab2_ColModel_Stats_Col_AllocationCount.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_AllocationCount.Text = "Allocation Count";
+            this.iTab2_ColModel_Stats_Col_AllocationCount.Width = 100;
+            // 
+            // iTab2_ColModel_Stats_Col_MemoryPerInstance
+            // 
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance.Text = "Memory-per-Instance";
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance.Width = 100;
+            // 
+            // iTab2_ColModel_Stats_Col_TotalAllocatedMemory
+            // 
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory.Text = "Total Allocated Memory";
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory.Width = 110;
+            // 
+            // iTLP
+            // 
+            this.iTLP.ColumnCount = 3;
+            this.iTLP.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 62F ) );
+            this.iTLP.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Absolute, 4F ) );
+            this.iTLP.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 38F ) );
+            this.iTLP.Controls.Add( this.iLV_Summary, 2, 0 );
+            this.iTLP.Controls.Add( this.iTable_SymbolMemory, 0, 0 );
+            this.iTLP.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTLP.Location = new System.Drawing.Point( 0, 0 );
+            this.iTLP.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iTLP.Name = "iTLP";
+            this.iTLP.RowCount = 1;
+            this.iTLP.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iTLP.Size = new System.Drawing.Size( 931, 293 );
+            this.iTLP.TabIndex = 7;
+            // 
+            // HeapCellStatsControl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add( this.iTLP );
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.Name = "HeapCellStatsControl";
+            this.Size = new System.Drawing.Size( 931, 293 );
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable_SymbolMemory ) ).EndInit();
+            this.iTLP.ResumeLayout( false );
+            this.ResumeLayout( false );
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.ListView iLV_Summary;
+        private System.Windows.Forms.ColumnHeader iColItem;
+        private System.Windows.Forms.ColumnHeader iColTotal;
+        private System.Windows.Forms.ColumnHeader iColPercentage;
+        private XPTable.Models.Table iTable_SymbolMemory;
+        private XPTable.Models.ColumnModel iColumnModel_SymbolMemory;
+        private XPTable.Models.TableModel iTableModel_SymbolMemory;
+        private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_Symbol;
+        private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_AllocationCount;
+        private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_MemoryPerInstance;
+        private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_TotalAllocatedMemory;
+        private System.Windows.Forms.TableLayoutPanel iTLP;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellStatsControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,322 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.IO;
+using System.Text;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics;
+using HeapLib.Statistics.Tracking.Base;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapLib.Reconstructor.DataSources;
+
+namespace HeapUiLib.Controls
+{
+    public partial class HeapCellStatsControl : UserControl
+    {
+        #region Constructors
+        public HeapCellStatsControl()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region API
+        #endregion
+
+        #region Properties
+        [Browsable(false)]
+        [DefaultValue(null)]
+        [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+        public HeapReconstructor Reconstructor
+        {
+            get { return iReconstructor; }
+            set
+            {
+                iReconstructor = value;
+                //
+                if ( iReconstructor != null )
+                {
+                    UpdateMainTable();
+                    UpdateSummary();
+                }
+            }
+        }
+
+        private HeapStatistics Statistics
+        {
+            get
+            {
+                HeapStatistics ret = null;
+                //
+                if ( Reconstructor != null )
+                {
+                    ret = Reconstructor.Statistics;
+                }
+                //
+                return ret;
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iPG3_StatsTable_SelectionChanged( object sender, XPTable.Events.SelectionEventArgs e )
+        {
+            if ( e.NewSelectedIndicies.Length > 0 )
+            {
+                UpdateSelectionTotals();
+            }
+        }
+
+        private void iPG3_StatsTable_PrepareForSort( object sender, XPTable.Events.SortEventArgs e )
+        {
+            TrackingComparisonBase type = null;
+            switch ( e.Index )
+            {
+            default:
+            case 0:
+                type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortBySymbolName( false );
+                break;
+            case 1:
+                type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortByCount( false );
+                break;
+            case 2:
+                type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortByPayloadLength( false );
+                break;
+            case 3:
+                type = new HeapLib.Statistics.Tracking.Base.TrackingInfoSortByAssociatedMemory( false );
+                break;
+            }
+            //
+            if ( type == null )
+            {
+                throw new Exception( "No comparer for specified column" );
+            }
+            //
+            e.Comparer = new TrackingInfoComparerWrapper( type );
+        }
+        #endregion
+
+        #region Internal classes
+        private class TrackingInfoComparerWrapper : IComparer
+        {
+            #region Constructors
+            public TrackingInfoComparerWrapper( TrackingComparisonBase aBase )
+            {
+                iBaseComparer = aBase;
+            }
+            #endregion
+
+            #region IComparer Members
+            public int Compare( object aLeft, object aRight )
+            {
+                TrackingInfo left = null;
+                TrackingInfo right = null;
+                //
+                if ( ( aLeft is TrackingInfo ) && ( aRight is TrackingInfo ) )
+                {
+                    left = (TrackingInfo) aLeft;
+                    right = (TrackingInfo) aRight;
+                }
+                else if ( aLeft is XPTable.Models.Cell && aRight is XPTable.Models.Cell )
+                {
+                    XPTable.Models.Cell cellLeft = ( aLeft as XPTable.Models.Cell );
+                    XPTable.Models.Cell cellRight = ( aRight as XPTable.Models.Cell );
+                    //
+                    left = (TrackingInfo) cellLeft.Row.Tag;
+                    right = (TrackingInfo) cellRight.Row.Tag;
+                }
+
+                // Now do the compare...
+                int ret = iBaseComparer.Compare( left, right );
+                return ret;
+            }
+            #endregion
+
+            #region Data members
+            private readonly TrackingComparisonBase iBaseComparer;
+            #endregion
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateMainTable()
+        {
+            iTable_SymbolMemory.BeginUpdate();
+            iTable_SymbolMemory.TableModel.Rows.Clear();
+
+            iReconstructor.Statistics.StatsAllocated.TrackerSymbols.SortByAllocatedMemory();
+            //
+            foreach ( TrackingInfo item in iReconstructor.Statistics.StatsAllocated.TrackerSymbols )
+            {
+                XPTable.Models.Row row = new XPTable.Models.Row();
+                row.Tag = item;
+
+                // SYMBOL
+                System.Diagnostics.Debug.Assert( item.Symbol != null );
+                row.Cells.Add( new XPTable.Models.Cell( item.Symbol.NameWithoutVTablePrefix ) );
+
+                // ALLOC COUNT
+                row.Cells.Add( new XPTable.Models.Cell( item.Count.ToString() ) );
+
+                // MEMORY-PER-INSTANCE
+                row.Cells.Add( new XPTable.Models.Cell( item.PayloadLength.ToString() ) );
+
+                // TOTAL ALLOCATED MEMORY
+                row.Cells.Add( new XPTable.Models.Cell( item.AssociatedMemory.ToString() ) );
+
+                // Add row
+                iTable_SymbolMemory.TableModel.Rows.Add( row );
+            }
+
+            iTable_SymbolMemory.EndUpdate();
+        }
+
+        private void UpdateSummary()
+        {
+            long heapCellHeaderOverheadSize = Statistics.SizeTotalHeader;
+            long symbolicMatchMemorySize = Statistics.StatsAllocated.TrackerSymbols.TypeSize;
+            long otherMemorySize = ( Statistics.StatsAllocated.TypeSize - Statistics.StatsAllocated.TrackerSymbols.TypeSize );
+            long freeSpaceSize = Statistics.StatsFree.TypeSize;
+            long totalCellCount = Statistics.StatsAllocated.TypeCount + Statistics.StatsFree.TypeCount;
+
+            // 1ST GROUP
+            iLV_Summary.Items[ 0 ].SubItems[ 1 ].Text = Statistics.StatsAllocated.TypeCount.ToString();
+            iLV_Summary.Items[ 0 ].SubItems[ 2 ].Text = NumberFormattingUtils.NumberAsPercentageTwoDP( Statistics.StatsAllocated.TypeCount, totalCellCount ) + " %";
+            iLV_Summary.Items[ 1 ].SubItems[ 1 ].Text = Statistics.StatsFree.TypeCount.ToString();
+            iLV_Summary.Items[ 1 ].SubItems[ 2 ].Text = NumberFormattingUtils.NumberAsPercentageTwoDP( Statistics.StatsFree.TypeCount, totalCellCount ) + " %";
+            
+            // 2ND GROUP
+            iLV_Summary.Items[ 2 ].SubItems[ 1 ].Text = symbolicMatchMemorySize.ToString();
+            iLV_Summary.Items[ 2 ].SubItems[ 2 ].Text = NumberFormattingUtils.NumberAsPercentageTwoDP( symbolicMatchMemorySize, symbolicMatchMemorySize + otherMemorySize + freeSpaceSize ) + " %";
+            iLV_Summary.Items[ 3 ].SubItems[ 1 ].Text = otherMemorySize.ToString();
+            iLV_Summary.Items[ 3 ].SubItems[ 2 ].Text = NumberFormattingUtils.NumberAsPercentageTwoDP( otherMemorySize, symbolicMatchMemorySize + otherMemorySize + freeSpaceSize ) + " %";
+            // (4) is a spacer
+            iLV_Summary.Items[ 5 ].SubItems[ 1 ].Text = ( symbolicMatchMemorySize + otherMemorySize ).ToString();
+            iLV_Summary.Items[ 5 ].SubItems[ 2 ].Text = NumberFormattingUtils.NumberAsPercentageTwoDP( symbolicMatchMemorySize + otherMemorySize, symbolicMatchMemorySize + otherMemorySize + freeSpaceSize ) + " %";
+            iLV_Summary.Items[ 6 ].SubItems[ 1 ].Text = freeSpaceSize.ToString();
+            iLV_Summary.Items[ 6 ].SubItems[ 2 ].Text = NumberFormattingUtils.NumberAsPercentageTwoDP( freeSpaceSize, symbolicMatchMemorySize + otherMemorySize + freeSpaceSize ) + " %";
+            // (7) is a spacer
+            iLV_Summary.Items[ 8 ].SubItems[ 1 ].Text = heapCellHeaderOverheadSize.ToString();
+            iLV_Summary.Items[ 8 ].SubItems[ 2 ].Text = NumberFormattingUtils.NumberAsPercentageTwoDP( heapCellHeaderOverheadSize, symbolicMatchMemorySize + otherMemorySize + freeSpaceSize ) + " %";
+            
+            // 3RD GROUP
+            iLV_Summary.Items[ 10 ].SubItems[ 1 ].Text = ( heapCellHeaderOverheadSize + symbolicMatchMemorySize + otherMemorySize ).ToString();
+            iLV_Summary.Items[ 10 ].SubItems[ 2 ].Text = "100.00 %";
+        }
+
+        private void UpdateSelectionTotals()
+        {
+            bool atLeastOneValue = false;
+            long total = 0;
+
+            foreach ( XPTable.Models.Row row in iTable_SymbolMemory.SelectedItems )
+            {
+                TrackingInfo item = (TrackingInfo) row.Tag;
+                //
+                total += item.AssociatedMemory;
+                atLeastOneValue = true;
+            }
+
+            string totalValueAsString = "[nothing selected]";
+            string totalAsPercentageString = "";
+            //
+            if ( atLeastOneValue )
+            {
+                int allocCount;
+                int freeCount;
+                long freeSpaceSize;
+                long allocatedUnknownSize;
+                long allocatedSymbolMatchSize;
+                long totalHeapAllocatedMemory = TotalAllocatedMemory( out allocCount, out freeCount, out freeSpaceSize, out allocatedUnknownSize, out allocatedSymbolMatchSize );
+                //
+                totalValueAsString = total.ToString();
+                totalAsPercentageString = NumberFormattingUtils.NumberAsPercentageTwoDP( total, totalHeapAllocatedMemory ) + " %";
+            }
+            //
+            iLV_Summary.Items[ 9 ].SubItems[ 1 ].Text = totalValueAsString;
+            iLV_Summary.Items[ 9 ].SubItems[ 2 ].Text = totalAsPercentageString;
+        }
+
+        private long TotalAllocatedMemory( out int aAllocCount, out int aFreeCount, out long aFreeSpaceSize, out long aAllocatedUnknownSize, out long aAllocatedSymbolMatchSize )
+        {
+            aAllocCount = 0;
+            aFreeCount = 0;
+            aFreeSpaceSize = 0;
+            aAllocatedUnknownSize = 0;
+            aAllocatedSymbolMatchSize = 0;
+            //
+            HeapCellArray data = iReconstructor.Data;
+            int count = data.Count;
+            //
+            for ( int i = 0; i < count; i++ )
+            {
+                HeapCell cell = data[ i ];
+                //
+                if ( cell.Type == HeapCell.TType.EAllocated )
+                {
+                    ++aAllocCount;
+                    if ( cell.Symbol != null )
+                        aAllocatedSymbolMatchSize += cell.Length;
+                    else
+                        aAllocatedUnknownSize += cell.Length;
+                }
+                else
+                {
+                    ++aFreeCount;
+                    aFreeSpaceSize += cell.Length;
+                }
+            }
+
+            return ( aAllocatedSymbolMatchSize + aAllocatedUnknownSize + aFreeSpaceSize );
+        }
+        #endregion
+
+        #region Data members
+        private HeapReconstructor iReconstructor = null;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellStatsControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iColumnModel_SymbolMemory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>6, 7</value>
+  </metadata>
+  <metadata name="iTableModel_SymbolMemory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>216, 7</value>
+  </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>34</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellViewerControl.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,217 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapUiLib.Controls
+{
+    partial class HeapCellViewerControl
+    {
+        // <summary> 
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary> 
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Component Designer generated code
+
+        // <summary> 
+        // Required method for Designer support - do not modify 
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            XPTable.Models.DataSourceColumnBinder dataSourceColumnBinder1 = new XPTable.Models.DataSourceColumnBinder();
+            this.iTL_Bottom = new System.Windows.Forms.TableLayoutPanel();
+            this.iButton_PageUp = new System.Windows.Forms.Button();
+            this.iButton_PageDown = new System.Windows.Forms.Button();
+            this.iTable_RawItems = new XPTable.Models.Table();
+            this.iColumnModel = new XPTable.Models.ColumnModel();
+            this.iCol_Address = new XPTable.Models.TextColumn();
+            this.iCol_RawData = new XPTable.Models.TextColumn();
+            this.iCol_Interpreted = new XPTable.Models.TextColumn();
+            this.iCol_CharacterisedData = new XPTable.Models.TextColumn();
+            this.iTableModel = new XPTable.Models.TableModel();
+            this.iTimerRefresh = new System.Windows.Forms.Timer( this.components );
+            this.iTL_Bottom.SuspendLayout();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable_RawItems ) ).BeginInit();
+            this.SuspendLayout();
+            // 
+            // iTL_Bottom
+            // 
+            this.iTL_Bottom.ColumnCount = 2;
+            this.iTL_Bottom.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iTL_Bottom.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Absolute, 50F ) );
+            this.iTL_Bottom.Controls.Add( this.iButton_PageUp, 1, 0 );
+            this.iTL_Bottom.Controls.Add( this.iButton_PageDown, 1, 2 );
+            this.iTL_Bottom.Controls.Add( this.iTable_RawItems, 0, 0 );
+            this.iTL_Bottom.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTL_Bottom.Location = new System.Drawing.Point( 0, 0 );
+            this.iTL_Bottom.Name = "iTL_Bottom";
+            this.iTL_Bottom.RowCount = 3;
+            this.iTL_Bottom.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 33.33333F ) );
+            this.iTL_Bottom.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 33.33333F ) );
+            this.iTL_Bottom.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 33.33333F ) );
+            this.iTL_Bottom.Size = new System.Drawing.Size( 334, 120 );
+            this.iTL_Bottom.TabIndex = 4;
+            // 
+            // iButton_PageUp
+            // 
+            this.iButton_PageUp.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iButton_PageUp.Location = new System.Drawing.Point( 287, 3 );
+            this.iButton_PageUp.Name = "iButton_PageUp";
+            this.iButton_PageUp.Size = new System.Drawing.Size( 44, 34 );
+            this.iButton_PageUp.TabIndex = 13;
+            this.iButton_PageUp.Text = "Page Up";
+            this.iButton_PageUp.Click += new System.EventHandler( this.iButton_PageUp_Click );
+            // 
+            // iButton_PageDown
+            // 
+            this.iButton_PageDown.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iButton_PageDown.Location = new System.Drawing.Point( 287, 83 );
+            this.iButton_PageDown.Name = "iButton_PageDown";
+            this.iButton_PageDown.Size = new System.Drawing.Size( 44, 34 );
+            this.iButton_PageDown.TabIndex = 15;
+            this.iButton_PageDown.Text = "Page Down";
+            this.iButton_PageDown.Click += new System.EventHandler( this.iButton_PageDown_Click );
+            // 
+            // iTable_RawItems
+            // 
+            this.iTable_RawItems.AlternatingRowColor = System.Drawing.Color.WhiteSmoke;
+            this.iTable_RawItems.BorderColor = System.Drawing.Color.Black;
+            this.iTable_RawItems.ColumnModel = this.iColumnModel;
+            this.iTable_RawItems.DataMember = null;
+            this.iTable_RawItems.DataSourceColumnBinder = dataSourceColumnBinder1;
+            this.iTable_RawItems.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTable_RawItems.EnableToolTips = true;
+            this.iTable_RawItems.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable_RawItems.GridLines = XPTable.Models.GridLines.Both;
+            this.iTable_RawItems.HeaderFont = new System.Drawing.Font( "Tahoma", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTable_RawItems.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
+            this.iTable_RawItems.Location = new System.Drawing.Point( 3, 3 );
+            this.iTable_RawItems.Name = "iTable_RawItems";
+            this.iTable_RawItems.NoItemsText = "Nothing Selected or No Data";
+            this.iTable_RawItems.NoItemsTextColor = System.Drawing.SystemColors.ControlText;
+            this.iTable_RawItems.NoItemsTextFont = new System.Drawing.Font( "Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTL_Bottom.SetRowSpan( this.iTable_RawItems, 3 );
+            this.iTable_RawItems.Size = new System.Drawing.Size( 278, 114 );
+            this.iTable_RawItems.TabIndex = 21;
+            this.iTable_RawItems.TableModel = this.iTableModel;
+            this.iTable_RawItems.UnfocusedBorderColor = System.Drawing.Color.Black;
+            this.iTable_RawItems.CellDoubleClick += new XPTable.Events.CellMouseEventHandler( this.iTable_RawItems_CellDoubleClick );
+            // 
+            // iColumnModel
+            // 
+            this.iColumnModel.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iCol_Address,
+            this.iCol_RawData,
+            this.iCol_Interpreted,
+            this.iCol_CharacterisedData} );
+            // 
+            // iCol_Address
+            // 
+            this.iCol_Address.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_Address.ContentWidth = 44;
+            this.iCol_Address.Text = "Address";
+            this.iCol_Address.Width = 70;
+            // 
+            // iCol_RawData
+            // 
+            this.iCol_RawData.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_RawData.ContentWidth = 52;
+            this.iCol_RawData.Text = "Raw Data";
+            this.iCol_RawData.Width = 70;
+            // 
+            // iCol_Interpreted
+            // 
+            this.iCol_Interpreted.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_Interpreted.ContentWidth = 61;
+            this.iCol_Interpreted.Text = "Interpreted";
+            this.iCol_Interpreted.Width = 70;
+            // 
+            // iCol_CharacterisedData
+            // 
+            this.iCol_CharacterisedData.Alignment = XPTable.Models.ColumnAlignment.Center;
+            this.iCol_CharacterisedData.ContentWidth = 4;
+            this.iCol_CharacterisedData.Text = " ";
+            this.iCol_CharacterisedData.Width = 40;
+            // 
+            // iTimerRefresh
+            // 
+            this.iTimerRefresh.Interval = 1;
+            this.iTimerRefresh.Tick += new System.EventHandler( this.iTimerRefresh_Tick );
+            // 
+            // HeapCellViewerControl
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add( this.iTL_Bottom );
+            this.MinimumSize = new System.Drawing.Size( 334, 120 );
+            this.Name = "HeapCellViewerControl";
+            this.Size = new System.Drawing.Size( 334, 120 );
+            this.iTL_Bottom.ResumeLayout( false );
+            ( (System.ComponentModel.ISupportInitialize) ( this.iTable_RawItems ) ).EndInit();
+            this.ResumeLayout( false );
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.TableLayoutPanel iTL_Bottom;
+        private System.Windows.Forms.Button iButton_PageUp;
+        private System.Windows.Forms.Button iButton_PageDown;
+        private XPTable.Models.Table iTable_RawItems;
+        private XPTable.Models.ColumnModel iColumnModel;
+        private XPTable.Models.TableModel iTableModel;
+        private XPTable.Models.TextColumn iCol_Address;
+        private XPTable.Models.TextColumn iCol_RawData;
+        private XPTable.Models.TextColumn iCol_Interpreted;
+        private XPTable.Models.TextColumn iCol_CharacterisedData;
+        private System.Windows.Forms.Timer iTimerRefresh;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellViewerControl.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,263 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+using HeapLib.Cells;
+using HeapLib.Relationships;
+
+namespace HeapUiLib.Controls
+{
+    public partial class HeapCellViewerControl : UserControl
+    {
+        #region Events
+        public delegate void OnCellLinkDoubleClicked( HeapCell aCell );
+        public event OnCellLinkDoubleClicked CellLinkDoubleClicked;
+        #endregion
+
+        #region Constructors & destructor
+        public HeapCellViewerControl()
+        {
+            InitializeComponent();
+        }
+        #endregion
+
+        #region Properties
+        [Browsable(false)]
+        public HeapCell Cell
+        {
+            get { return iCell; }
+            set
+            {
+                // This will asynchronously redraw the table
+                iCell = value;
+                DisplayRawDataItemIndex = 0;
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iTimerRefresh_Tick( object sender, EventArgs e )
+        {
+            iTimerRefresh.Enabled = false;
+            iTimerRefresh.Stop();
+            //
+            UpdateTable();
+        }
+
+        private void iTable_RawItems_CellDoubleClick( object sender, XPTable.Events.CellMouseEventArgs e )
+        {
+            if ( e.Cell.Tag != null && e.Cell.Tag is HeapCell )
+            {
+                HeapCell linkedCell = (HeapCell) e.Cell.Tag;
+                //
+                if ( CellLinkDoubleClicked != null )
+                {
+                    CellLinkDoubleClicked( linkedCell );
+                }
+            }
+        }
+
+        private void iButton_PageUp_Click( object sender, EventArgs e )
+        {
+            HeapCell selectedCell = Cell;
+            if ( selectedCell != null )
+            {
+                DisplayRawDataItemIndex -= KNumberOfRowsPerPage;
+            }
+        }
+
+        private void iButton_PageDown_Click( object sender, EventArgs e )
+        {
+            HeapCell selectedCell = Cell;
+            if ( selectedCell != null )
+            {
+                DisplayRawDataItemIndex += KNumberOfRowsPerPage;
+            }
+        }
+        #endregion
+
+        #region Internal properties
+        private int DisplayRawDataItemIndex
+        {
+            get { return iDisplayRawDataItemIndex; }
+            set
+            {
+                iDisplayRawDataItemIndex = value;
+                //
+                SetPageUpButtonStatus();
+                SetPageDownButtonStatus();
+                //
+                RefreshContentsByTimer();
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        private void UpdateTable()
+        {
+            HeapCell cell = Cell;
+            //
+            iTable_RawItems.BeginUpdate();
+            iTableModel.Rows.Clear();
+            //            
+            if ( cell != null )
+            {
+                // Work out our raw item offset and how many raw items to create in this operation
+                SymbianUtils.RawItems.RawItemCollection rawItems = cell.RawItems;
+                int rawItemIndexStart = DisplayRawDataItemIndex;
+                int rawItemIndexEnd = Math.Min( rawItems.Count, rawItemIndexStart + KNumberOfRowsPerPage ); 
+                //
+                for ( int rawItemIndex = rawItemIndexStart; rawItemIndex < rawItemIndexEnd; rawItemIndex++ )
+                {
+                    SymbianUtils.RawItems.RawItem rawEntry = rawItems[ rawItemIndex ];
+                    XPTable.Models.Row row = new XPTable.Models.Row();
+
+                    // Cell 1: address
+                    XPTable.Models.Cell cellAddress = new XPTable.Models.Cell( rawEntry.Address.ToString( "x8" ) );
+
+                    // Cell 2: raw data
+                    XPTable.Models.Cell cellRawData = new XPTable.Models.Cell( rawEntry.OriginalData.ToString( "x8" ) );
+
+                    // Cell 3: interpreted data
+                    XPTable.Models.Cell cellInterpretedData = new XPTable.Models.Cell( rawEntry.Data.ToString( "x8" ) );
+
+                    // Cell 4: characterised data
+                    XPTable.Models.Cell cellCharacterisedData = new XPTable.Models.Cell( rawEntry.OriginalCharacterisedData );
+
+                    // Update style of "interpreted data" if there is a link to another cell. 
+                    RelationshipInfo relationshipDescriptor = ( rawEntry.Tag != null && rawEntry.Tag is RelationshipInfo ) ? (RelationshipInfo) rawEntry.Tag : null;
+                    if ( relationshipDescriptor != null )
+                    {
+                        // The colour depends on whether it is a clean link or not. Clean means whether or not the
+                        // link points to the start of the specified cell.
+                        HeapCell linkedCell = relationshipDescriptor.ToCell;
+                        //
+                        if ( relationshipDescriptor.IsCleanLink )
+                        {
+                            cellInterpretedData.ForeColor = Color.Blue;
+                            cellInterpretedData.ToolTipText = "Link to start of: " + linkedCell.SymbolString + " @ 0x" + linkedCell.Address.ToString( "x8" );
+                        }
+                        else
+                        {
+                            cellInterpretedData.ForeColor = Color.DarkBlue;
+                            cellInterpretedData.ToolTipText = "Link within: " + linkedCell.SymbolString + " @ 0x" + linkedCell.Address.ToString( "x8" );
+                        }
+
+                        cellInterpretedData.Font = new Font( iTable_RawItems.Font, FontStyle.Underline );
+                        cellInterpretedData.Tag = linkedCell;
+                    }
+
+                    // Finish construction
+                    row.Cells.Add( cellAddress );
+                    row.Cells.Add( cellRawData );
+                    row.Cells.Add( cellInterpretedData );
+                    row.Cells.Add( cellCharacterisedData );
+                    iTableModel.Rows.Add( row );
+                }
+            }
+
+            // Try to select first item
+            if ( iTable_RawItems.TableModel.Rows.Count > 0 )
+            {
+                iTable_RawItems.EnsureVisible( 0, 0 );
+                iTable_RawItems.TableModel.Selections.SelectCell( 0, 0 );
+            }
+
+            iTable_RawItems.EndUpdate();
+        }
+
+        private void RefreshContentsByTimer()
+        {
+            if ( iTimerRefresh.Enabled )
+            {
+                iTimerRefresh.Enabled = false;
+                iTimerRefresh.Stop();
+            }
+
+            iTimerRefresh.Enabled = true;
+            iTimerRefresh.Start();
+        }
+
+		private void SetPageUpButtonStatus()
+		{
+			bool enabled = false;
+            HeapCell selectedCell = Cell;
+            if ( selectedCell != null )
+            {
+                SymbianUtils.RawItems.RawItemCollection rawItems = selectedCell.RawItems;
+                //
+                int previousWindowStart = DisplayRawDataItemIndex - KNumberOfRowsPerPage;
+                int previousWindowEnd = DisplayRawDataItemIndex;
+                //
+                enabled = ( previousWindowStart >= 0 );
+            }
+			iButton_PageUp.Enabled = enabled;
+		}
+
+		private void SetPageDownButtonStatus()
+		{
+			bool enabled = false;
+            HeapCell selectedCell = Cell;
+            if ( selectedCell != null )
+            {
+                SymbianUtils.RawItems.RawItemCollection rawItems = selectedCell.RawItems;
+                //
+                int nextWindowStart = DisplayRawDataItemIndex + KNumberOfRowsPerPage;
+                int nextWindowEnd = Math.Min( rawItems.Count, nextWindowStart + KNumberOfRowsPerPage );
+                //
+                enabled = ( nextWindowStart < rawItems.Count );
+            }
+			iButton_PageDown.Enabled = enabled;
+		}
+        #endregion
+
+        #region Internal constants
+        private const int KNumberOfRowsPerPage = 128;
+        #endregion
+
+        #region Data members
+        private HeapCell iCell = new HeapCell();
+        private int iDisplayRawDataItemIndex = 0;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Controls/HeapCellViewerControl.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iColumnModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>428, 17</value>
+  </metadata>
+  <metadata name="iTableModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>549, 17</value>
+  </metadata>
+  <metadata name="iTimerRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>660, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapExportToHTMLProgressDialog.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using HeapLib;
+using HeapLib.Reconstructor;
+using SymbianUtils;
+
+namespace HeapUiLib.Dialogs
+{
+	public class HeapExportToHTMLProgressDialog : Form
+	{
+		#region Windows Form Designer generated code
+        private IContainer components;
+        private Timer iTimer_OpStart;
+        private System.Windows.Forms.ProgressBar iProgressBar;
+        #endregion
+
+		#region Constructors & destructor
+		public HeapExportToHTMLProgressDialog( HeapReconstructor aReconstructor, string aOutputDirectory )
+		{
+			InitializeComponent();
+			//
+			iReconstructor = aReconstructor;
+            //
+			iConverter = new HeapToHTMLConverter( aReconstructor, aOutputDirectory );
+            iConverter.Observer += new HeapToHTMLConverter.EventHandler( Converter_Observer );
+            //
+            iTimer_OpStart.Start();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            this.iProgressBar = new System.Windows.Forms.ProgressBar();
+            this.iTimer_OpStart = new System.Windows.Forms.Timer( this.components );
+            this.SuspendLayout();
+			// 
+			// iProgressBar
+			// 
+			this.iProgressBar.Location = new System.Drawing.Point(8, 8);
+			this.iProgressBar.Name = "iProgressBar";
+			this.iProgressBar.Size = new System.Drawing.Size(376, 23);
+			this.iProgressBar.TabIndex = 0;
+            // 
+            // iTimer_OpStart
+            // 
+            this.iTimer_OpStart.Interval = 10;
+            this.iTimer_OpStart.Tick += new System.EventHandler( this.iTimer_OpStart_Tick );
+            // 
+			// HeapExportToHTMLProgressDialog
+			// 
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.ClientSize = new System.Drawing.Size(392, 39);
+			this.ControlBox = false;
+			this.Controls.Add(this.iProgressBar);
+			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+			this.MaximizeBox = false;
+			this.MinimizeBox = false;
+			this.Name = "HeapExportToHTMLProgressDialog";
+			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+			this.Text = " Preparing HTML Output";
+			this.ResumeLayout(false);
+
+		}
+		#endregion
+
+		#region Converter observer
+        private void Converter_Observer( HeapToHTMLConverter.TEvent aEvent )
+		{
+			if	( InvokeRequired )
+			{
+                HeapToHTMLConverter.EventHandler observer = new HeapToHTMLConverter.EventHandler( Converter_Observer );
+				this.BeginInvoke( observer, new object[] { aEvent } );
+			}
+			else
+			{
+				switch (aEvent)
+				{
+                case HeapToHTMLConverter.TEvent.EEventStarted:
+					iProgressBar.Maximum = 100; //%
+					iProgressBar.Minimum = 0; //%
+					iProgressBar.Value = 0;
+					break;
+                case HeapToHTMLConverter.TEvent.EEventProgress:
+                    iProgressBar.Value = iConverter.Progress;
+					break;
+                case HeapToHTMLConverter.TEvent.EEventComplete:
+                    Close();
+					break;
+				}
+			}
+		}
+		#endregion
+
+        #region Event handlers
+        private void iTimer_OpStart_Tick( object sender, EventArgs e )
+        {
+            iTimer_OpStart.Stop();
+            iTimer_OpStart.Enabled = false;
+            //
+            iConverter.Convert( TSynchronicity.EAsynchronous );
+        }
+        #endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		private readonly HeapToHTMLConverter iConverter;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapExportToHTMLProgressDialog.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 1.3
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">1.3</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1">this is my long string</data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        [base64 mime encoded serialized .NET Framework object]
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        [base64 mime encoded string representing a byte array form of the .NET Framework object]
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used forserialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>1.3</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="iProgressBar.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iProgressBar.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iProgressBar.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>(Default)</value>
+  </data>
+  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.Name">
+    <value>HeapAnalysisHTMLOutputProgressDialog</value>
+  </data>
+  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>80</value>
+  </data>
+  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorDataSourceAnalyserDialog.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Reconstructor;
+using HeapLib.Reconstructor.DataSources.Analyser;
+
+namespace HeapUiLib.Dialogs
+{
+	public class HeapReconstructorDataSourceAnalyserDialog : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer generated code
+        private IContainer components;
+        private Timer iTimer_OpStart;
+        private System.Windows.Forms.ProgressBar iProgressBar;
+		#endregion
+
+		#region Constructors & destructor
+        public static DataSourceAnalyser Analyse( string[] aLines )
+		{
+            HeapReconstructorDataSourceAnalyserDialog self = new HeapReconstructorDataSourceAnalyserDialog( aLines );
+			self.ShowDialog();
+            return self.iAnalyser;
+        }
+
+        public static DataSourceAnalyser Analyse( string aFileName )
+        {
+            HeapReconstructorDataSourceAnalyserDialog self = new HeapReconstructorDataSourceAnalyserDialog( aFileName );
+			self.ShowDialog();
+            return self.iAnalyser;
+        }
+
+        internal HeapReconstructorDataSourceAnalyserDialog( string[] aLines )
+        {
+			InitializeComponent();
+            //
+            iAnalyser = new DataSourceAnalyser( aLines );
+            iAnalyser.iObserver += new DataSourceAnalyser.Observer( Analyser_Observer );
+            //
+            iTimer_OpStart.Start();
+        }
+
+        internal HeapReconstructorDataSourceAnalyserDialog( string aFileName )
+		{
+			InitializeComponent();
+			//
+            iAnalyser = new DataSourceAnalyser( aFileName );
+            iAnalyser.iObserver += new DataSourceAnalyser.Observer( Analyser_Observer );
+            //
+            iTimer_OpStart.Start();
+        }
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            this.iProgressBar = new System.Windows.Forms.ProgressBar();
+            this.iTimer_OpStart = new System.Windows.Forms.Timer( this.components );
+            this.SuspendLayout();
+            // 
+            // iProgressBar
+            // 
+            this.iProgressBar.Location = new System.Drawing.Point( 8, 8 );
+            this.iProgressBar.Name = "iProgressBar";
+            this.iProgressBar.Size = new System.Drawing.Size( 376, 24 );
+            this.iProgressBar.TabIndex = 0;
+            // 
+            // iTimer_OpStart
+            // 
+            this.iTimer_OpStart.Interval = 10;
+            this.iTimer_OpStart.Tick += new System.EventHandler( this.iTimer_OpStart_Tick );
+            // 
+            // HeapReconstructorDataSourceAnalyserDialog
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.ClientSize = new System.Drawing.Size( 392, 39 );
+            this.ControlBox = false;
+            this.Controls.Add( this.iProgressBar );
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "HeapReconstructorDataSourceAnalyserDialog";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Analysing Data...";
+            this.ResumeLayout( false );
+
+		}
+		#endregion
+
+        #region Heap reconstructor parser observer
+        private void Analyser_Observer( DataSourceAnalyser.TEvent aEvent, DataSourceAnalyser aSender )
+		{
+			if  ( InvokeRequired )
+			{
+                DataSourceAnalyser.Observer observer = new DataSourceAnalyser.Observer( Analyser_Observer );
+                this.BeginInvoke( observer, new object[] { aEvent, aSender } );
+			}
+			else
+			{
+				switch (aEvent)
+				{
+                    case DataSourceAnalyser.TEvent.EReadingStarted:
+						iProgressBar.Maximum = 100; //%
+						iProgressBar.Minimum = 0; //%
+						iProgressBar.Value = 0;
+						break;
+                    case DataSourceAnalyser.TEvent.EReadingProgress:
+						iProgressBar.Value = iAnalyser.Progress;
+						break;
+                    case DataSourceAnalyser.TEvent.EReadingComplete:
+						Close();
+						break;
+				}
+			}
+		}
+		#endregion
+
+        #region Event handlers
+        private void iTimer_OpStart_Tick( object sender, EventArgs e )
+        {
+            iTimer_OpStart.Stop();
+            iTimer_OpStart.Enabled = false;
+            //
+            iAnalyser.Analyse();
+        }
+        #endregion
+
+		#region Data members
+        private readonly DataSourceAnalyser iAnalyser;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorDataSourceAnalyserDialog.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer_OpStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorProgressDialog.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,177 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Reconstructor;
+
+namespace HeapUiLib.Dialogs
+{
+	public class HeapReconstructorProgressDialog : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer generated code
+        private IContainer components;
+        private Timer iTimer_OpStart;
+        private System.Windows.Forms.ProgressBar iProgressBar;
+		#endregion
+
+		#region Constructors & destructor
+		public static void ParseLog( HeapReconstructor aReconstructor  )
+		{
+            ParseLog( aReconstructor, string.Empty );
+		}
+
+		public static void ParseLog( HeapReconstructor aReconstructor, string aTitle  )
+		{
+            HeapReconstructorProgressDialog self = new HeapReconstructorProgressDialog( aReconstructor, aTitle );
+			self.ShowDialog();
+		}
+
+        internal HeapReconstructorProgressDialog( HeapReconstructor aReconstructor, string aTitle )
+		{
+            iReconstructor = aReconstructor;
+            //
+			InitializeComponent();
+            //
+            iTimer_OpStart.Start();
+            //
+            if ( aTitle != string.Empty )
+            {
+                this.Text = aTitle;
+            }
+            //
+            iReconstructor.iObserver += new HeapReconstructor.Observer( HeapReconstructorObserver );
+        }
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            this.iProgressBar = new System.Windows.Forms.ProgressBar();
+            this.iTimer_OpStart = new System.Windows.Forms.Timer( this.components );
+            this.SuspendLayout();
+            // 
+            // iProgressBar
+            // 
+            this.iProgressBar.Location = new System.Drawing.Point( 8, 8 );
+            this.iProgressBar.Name = "iProgressBar";
+            this.iProgressBar.Size = new System.Drawing.Size( 376, 24 );
+            this.iProgressBar.TabIndex = 0;
+            // 
+            // iTimer_OpStart
+            // 
+            this.iTimer_OpStart.Interval = 10;
+            this.iTimer_OpStart.Tick += new System.EventHandler( this.iTimer_OpStart_Tick );
+            // 
+            // HeapCellReconstructorProgressDialog
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.ClientSize = new System.Drawing.Size( 392, 39 );
+            this.ControlBox = false;
+            this.Controls.Add( this.iProgressBar );
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "HeapCellReconstructorProgressDialog";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = " Analysing Heap Data...";
+            this.ResumeLayout( false );
+
+		}
+		#endregion
+
+        #region Heap reconstructor callback
+        private void HeapReconstructorObserver( HeapReconstructor.TEvent aEvent, HeapReconstructor aReconstructor )
+        {
+            if ( InvokeRequired )
+            {
+                HeapReconstructor.Observer observer = new HeapReconstructor.Observer( HeapReconstructorObserver );
+                this.BeginInvoke( observer, new object[] { aEvent, aReconstructor } );
+            }
+            else
+            {
+                switch ( aEvent )
+                {
+                    case HeapReconstructor.TEvent.EReconstructingStarted:
+                        iProgressBar.Maximum = 100; //%
+                        iProgressBar.Minimum = 0; //%
+                        iProgressBar.Value = 0;
+                        break;
+                    case HeapReconstructor.TEvent.EReconstructingProgress:
+                        iProgressBar.Value = iReconstructor.Progress;
+                        break;
+                    case HeapReconstructor.TEvent.EReconstructingComplete:
+                        Close();
+                        break;
+                }
+            }
+        }
+        #endregion
+
+        #region Event handlers
+        private void iTimer_OpStart_Tick( object sender, EventArgs e )
+        {
+            iTimer_OpStart.Stop();
+            iTimer_OpStart.Enabled = false;
+            //
+            iReconstructor.Reconstruct();
+        }
+        #endregion
+
+		#region Data members
+		private readonly HeapReconstructor iReconstructor;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapReconstructorProgressDialog.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer_OpStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapViewerAboutDialog.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,146 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using HeapLib.Constants;
+
+namespace HeapUiLib.Dialogs
+{
+	public class HeapViewerAboutDialog : System.Windows.Forms.Form
+    {
+        #region Windows Form
+        private System.Windows.Forms.Label label1;
+		private System.Windows.Forms.Label iLbl_Version;
+        private System.Windows.Forms.Label iLbl_Copyright;
+		private System.ComponentModel.Container components = null;
+        #endregion
+
+        #region Constructors & destructor
+        public HeapViewerAboutDialog()
+		{
+			InitializeComponent();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+        }
+        #endregion
+
+        #region Windows Form Designer generated code
+        /// <summary>
+		/// Required method for Designer support - do not modify
+		/// the contents of this method with the code editor.
+		/// </summary>
+		private void InitializeComponent()
+		{
+            this.label1 = new System.Windows.Forms.Label();
+            this.iLbl_Version = new System.Windows.Forms.Label();
+            this.iLbl_Copyright = new System.Windows.Forms.Label();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            this.label1.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.label1.Location = new System.Drawing.Point(12, 9);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(336, 16);
+            this.label1.TabIndex = 3;
+            this.label1.Text = "Heap Analyser";
+            this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // iLbl_Version
+            // 
+            this.iLbl_Version.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.iLbl_Version.Location = new System.Drawing.Point(12, 45);
+            this.iLbl_Version.Name = "iLbl_Version";
+            this.iLbl_Version.Size = new System.Drawing.Size(336, 16);
+            this.iLbl_Version.TabIndex = 4;
+            this.iLbl_Version.Text = "v0.99";
+            this.iLbl_Version.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // iLbl_Copyright
+            // 
+            this.iLbl_Copyright.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.iLbl_Copyright.Location = new System.Drawing.Point(12, 68);
+            this.iLbl_Copyright.Name = "iLbl_Copyright";
+            this.iLbl_Copyright.Size = new System.Drawing.Size(378, 35);
+            this.iLbl_Copyright.TabIndex = 1;
+            this.iLbl_Copyright.Text = "Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights rese" +
+                "rved.";
+            this.iLbl_Copyright.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // HeapViewerAboutDialog
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
+            this.ClientSize = new System.Drawing.Size(402, 112);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.iLbl_Version);
+            this.Controls.Add(this.iLbl_Copyright);
+            this.Font = new System.Drawing.Font("Tahoma", 8.25F);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "HeapViewerAboutDialog";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "About Heap Analyser";
+            this.Load += new System.EventHandler(this.HeapViewerAboutDialog_Load);
+            this.ResumeLayout(false);
+
+		}
+		#endregion
+
+        #region Event handlers
+        private void HeapViewerAboutDialog_Load( object sender, EventArgs e )
+        {
+            iLbl_Copyright.Text = HeapLibConstants.Copyright;
+            iLbl_Version.Text = HeapLibConstants.Version;
+        }
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Dialogs/HeapViewerAboutDialog.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Forms/HeapViewerForm.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,3017 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.IO;
+using System.Text;
+using SymbianUtils;
+using SymbianUtils.Settings;
+using SymbianUtils.XRef;
+using SymbianUtils.RawItems;
+using SymbianUtils.FileSystem.FilePair;
+using SymbianZipLib.GUI;
+using ZedGraph;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics.Tracking.Base;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapLib.Reconstructor.DataSources;
+using HeapUiLib.Dialogs;
+using HeapUiLib.SubForms;
+using HeapUiLib.Controls;
+using HeapUiLib.Misc;
+using HeapCtrlLib;
+
+namespace HeapUiLib.Forms
+{
+	public class HeapViewerForm : System.Windows.Forms.Form
+	{
+		#region Events
+		public delegate void HeapCellSelectedObserverHandler( HeapCell aCell );
+		public event HeapCellSelectedObserverHandler HeapCellSelectedObserver;
+		#endregion
+
+		#region Windows Form Designer generated code
+		private System.Windows.Forms.Timer iTimer_CreateToolBoxItems;
+		private System.Windows.Forms.MainMenu iMainMenu;
+		private System.Windows.Forms.MenuItem iMenuItem_File;
+		private System.Windows.Forms.MenuItem iMenuItem_Help;
+		private System.Windows.Forms.MenuItem iMenuItem_Help_About;
+		private System.Windows.Forms.MenuItem iMenuItem_File_Exit;
+		private System.Windows.Forms.MenuItem menuItem6;
+		private System.Windows.Forms.MenuItem iMenuItem_View;
+		private System.Windows.Forms.MenuItem iMenuItem_View_Show_RelationshipInspector;
+		private System.Windows.Forms.MenuItem iMenuItem_View_Show_CellContentsViewer;
+		private System.Windows.Forms.MenuItem iMenuItem_View_Show;
+		private System.Windows.Forms.Panel iPanel_Main;
+		private System.Windows.Forms.TabControl iTabs;
+		private System.Windows.Forms.TabPage iPG1_HeapView;
+        private System.Windows.Forms.TabPage iPG3_Objects;
+		private System.Windows.Forms.MenuItem iMenuItem_File_SaveAs;
+        private System.Windows.Forms.MenuItem iMenuItem_File_SaveAs_Zip;
+		private XPTable.Models.ColumnModel iTab2_ColModel_Stats;
+		private XPTable.Models.TableModel iTab2_TabModel_Stats;
+		private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_Symbol;
+		private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_AllocationCount;
+		private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_MemoryPerInstance;
+		private XPTable.Models.TextColumn iTab2_ColModel_Stats_Col_TotalAllocatedMemory;
+		private ZedGraph.ZedGraphControl iPG3_ObjectPieChart;
+        private System.Windows.Forms.TabPage iPG2_CellList;
+		private System.Windows.Forms.MenuItem iMenuItem_File_SaveAs_CSV;
+        private System.Windows.Forms.MenuItem iMenuItem_File_SaveAs_Text;
+        private System.Windows.Forms.GroupBox groupBox3;
+        private System.Windows.Forms.Button iPG1_BT_Search_ByAllocNumber;
+        private System.Windows.Forms.NumericUpDown iPG1_NumUD_Search_ByAllocNumber;
+        private System.Windows.Forms.TextBox iPG1_TB_Search_ByAddress;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Button iPG1_BT_Search_ByAddress;
+        private System.Windows.Forms.GroupBox groupBox6;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.RadioButton iPG1_RB_HeapView_ByCellType;
+        private HeapCtrlLib.HeapDataControl iPG1_HeapView_Viewer;
+        private System.Windows.Forms.RadioButton iPG1_RB_HeapView_ByObjectType;
+        private System.Windows.Forms.RadioButton iPG1_RB_HeapView_ByParentBinary;
+        private System.Windows.Forms.RadioButton iPG1_RB_HeapView_ByCellLength;
+        private System.Windows.Forms.RadioButton iPG1_RB_HeapView_ByCellAge;
+        private System.Windows.Forms.TabPage iPG4_Graphs;
+        private System.Windows.Forms.GroupBox groupBox2;
+        private System.Windows.Forms.MenuItem iMenuItem_View_Type;
+        private System.Windows.Forms.MenuItem iMenuItem_View_Type_Cell;
+        private System.Windows.Forms.MenuItem iMenuItem_View_Type_Object;
+        private System.Windows.Forms.MenuItem iMenuItem_View_Type_ParentBinary;
+        private System.Windows.Forms.MenuItem iMenuItem_View_Type_Length;
+        private System.Windows.Forms.MenuItem iMenuItem_View_Type_Age;
+        private ZedGraph.ZedGraphControl iPG4_GraphCtrl;
+        private System.Windows.Forms.RadioButton iPG4_RB_GraphType_SizeByIndex;
+        private System.Windows.Forms.RadioButton iPG4_RB_GraphType_CellSizeFree;
+        private System.Windows.Forms.RadioButton iPG4_RB_GraphType_CellSizeAllocated;
+        private System.Windows.Forms.RadioButton iPG4_RB_GraphType_CellOverhead;
+        private MenuItem iMenuItem_View_Zoom;
+        private MenuItem iMenuItem_View_Zoom_Small;
+        private MenuItem iMenuItem_View_Zoom_Medium;
+        private MenuItem iMenuItem_View_Zoom_Large;
+        private SplitContainer iPG2_SplitCon;
+        private HeapUiLib.Controls.HeapCellListingControl iPG2_CellList_Cells;
+        private RadioButton iPG4_RB_GraphType_AssociatedBinary;
+        private GroupBox iPG1_GP_Navigate_ByAllocNumber;
+        private Button iPG1_BT_Navigate_ByAllocNumber_Next;
+        private Button iPG1_BT_Navigate_ByAllocNumber_Previous;
+        private GroupBox groupBox4;
+        private Button iPG1_BT_Navigate_ByPosition_Next;
+        private Button iPG1_BT_Navigate_ByPosition_Previous;
+        private GroupBox groupBox5;
+        private Button iPG1_BT_HeapView_Filters;
+        private TabPage iPG5_Distribution;
+        private XPTable.Models.TableModel iPG5_TableModel_CellDistributionFree;
+        private XPTable.Models.TableModel iPG5_TableModel_CellDistributionAllocated;
+        private RadioButton iPG1_RB_HeapView_ByIsolation;
+        private RadioButton iPG1_RB_HeapView_ByEmbeddedReferences;
+        private TabPage iPG6_Relationships;
+        private HeapCellRelationshipControl iPG6_RelationshipControl;
+        private HeapCellListingFilter iPG2_FilterControl;
+        private ContextMenuStrip iPG1_HeapView_ContextMenu;
+        private ToolStripMenuItem iPopupMenu_Relationships;
+        private ToolStripMenuItem iPopupMenu_Show;
+        private ToolStripMenuItem iPopupMenu_Show_CellContentsViewer;
+        private ToolStripMenuItem iPopupMenu_Show_CellRelationshipInspector;
+        private ToolStripMenuItem iPopupMenu_XRef;
+        private ToolStripMenuItem iPopupMenu_XRef_Settings;
+        private MenuItem iMenuItem_View_Type_Isolation;
+        private MenuItem iMenuItem_View_Type_EmbeddedReferences;
+        private ToolStripMenuItem iPopupMenu_GoTo;
+        private ToolStripMenuItem iPopupMenu_GoTo_EmbeddedReferences;
+        private ToolStripMenuItem iPopupMenu_GoTo_IncomingReferences;
+        private ToolStripMenuItem iPopupMenu_Relationships_Outgoing;
+        private ToolStripMenuItem iPopupMenu_Relationships_Outgoing_View;
+        private ToolStripMenuItem iPopupMenu_Relationships_Incoming;
+        private ToolStripMenuItem iPopupMenu_Relationships_Incoming_View;
+        private ToolStripMenuItem iPopupMenu_Relationships_Incoming_Breadcrumbs;
+        private ToolStripMenuItem iPopupMenu_Relationships_Outgoing_Breadcrumbs;
+        private ToolStripMenuItem iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show;
+        private ToolStripMenuItem iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll;
+        private ToolStripMenuItem iPopupMenu_Relationships_Incoming_Breadcrumbs_Show;
+        private ToolStripMenuItem iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll;
+        private ToolTip iToolTip;
+        private FlowLayoutPanel iPG1_FLP_NavigateAndSearch;
+        private HeapCellInfoControl iPG1_HeapCellInfo;
+        private SplitContainer iPG1_SplitCon;
+        private FlowLayoutPanel iPG1_FLP_Top;
+        private TableLayoutPanel iPG1_TLP_Top;
+        private TableLayoutPanel iPG1_TLP_Bottom;
+        private SplitContainer iPG3_SplitCon;
+        private HeapCellStatsControl iPG3_StatsControl;
+        private HeapCellSizeDistributionControl iPG4_DistributionControl;
+        private GroupBox groupBox7;
+        private GroupBox groupBox8;
+        private MenuItem iMenuItem_File_SaveAs_HTML;
+		private System.ComponentModel.IContainer components;
+		#endregion
+
+		#region Constructors & destructor
+		public HeapViewerForm( HeapReconstructor aReconstructor, XmlSettings aSettings )
+		{
+			iReconstructor = aReconstructor;
+			iSettings = aSettings;
+			//
+			InitializeComponent();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager( typeof( HeapViewerForm ) );
+            HeapLib.Statistics.HeapStatistics heapStatistics1 = new HeapLib.Statistics.HeapStatistics();
+            HeapLib.Array.HeapCellArray heapCellArray1 = new HeapLib.Array.HeapCellArray();
+            HeapLib.Array.HeapCellArray heapCellArray2 = new HeapLib.Array.HeapCellArray();
+            HeapLib.Statistics.HeapStatistics heapStatistics2 = new HeapLib.Statistics.HeapStatistics();
+            this.iTimer_CreateToolBoxItems = new System.Windows.Forms.Timer( this.components );
+            this.iMainMenu = new System.Windows.Forms.MainMenu( this.components );
+            this.iMenuItem_File = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_File_SaveAs = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_File_SaveAs_Zip = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_File_SaveAs_CSV = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_File_SaveAs_Text = new System.Windows.Forms.MenuItem();
+            this.menuItem6 = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_File_Exit = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Show = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Show_RelationshipInspector = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Show_CellContentsViewer = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type_Cell = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type_Object = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type_ParentBinary = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type_Length = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type_Isolation = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type_EmbeddedReferences = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Type_Age = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Zoom = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Zoom_Small = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Zoom_Medium = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_View_Zoom_Large = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_Help = new System.Windows.Forms.MenuItem();
+            this.iMenuItem_Help_About = new System.Windows.Forms.MenuItem();
+            this.iPanel_Main = new System.Windows.Forms.Panel();
+            this.iTabs = new System.Windows.Forms.TabControl();
+            this.iPG1_HeapView = new System.Windows.Forms.TabPage();
+            this.iPG1_SplitCon = new System.Windows.Forms.SplitContainer();
+            this.iPG1_TLP_Top = new System.Windows.Forms.TableLayoutPanel();
+            this.iPG1_FLP_Top = new System.Windows.Forms.FlowLayoutPanel();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.iPG1_RB_HeapView_ByCellType = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_HeapView_ByObjectType = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_HeapView_ByParentBinary = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_HeapView_ByCellLength = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_HeapView_ByEmbeddedReferences = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_HeapView_ByIsolation = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_HeapView_ByCellAge = new System.Windows.Forms.RadioButton();
+            this.groupBox5 = new System.Windows.Forms.GroupBox();
+            this.iPG1_BT_HeapView_Filters = new System.Windows.Forms.Button();
+            this.iPG1_HeapView_Viewer = new HeapCtrlLib.HeapDataControl();
+            this.iPG1_TLP_Bottom = new System.Windows.Forms.TableLayoutPanel();
+            this.groupBox6 = new System.Windows.Forms.GroupBox();
+            this.iPG1_FLP_NavigateAndSearch = new System.Windows.Forms.FlowLayoutPanel();
+            this.groupBox4 = new System.Windows.Forms.GroupBox();
+            this.iPG1_BT_Navigate_ByPosition_Next = new System.Windows.Forms.Button();
+            this.iPG1_BT_Navigate_ByPosition_Previous = new System.Windows.Forms.Button();
+            this.iPG1_GP_Navigate_ByAllocNumber = new System.Windows.Forms.GroupBox();
+            this.iPG1_BT_Navigate_ByAllocNumber_Next = new System.Windows.Forms.Button();
+            this.iPG1_BT_Navigate_ByAllocNumber_Previous = new System.Windows.Forms.Button();
+            this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.iPG1_BT_Search_ByAllocNumber = new System.Windows.Forms.Button();
+            this.iPG1_NumUD_Search_ByAllocNumber = new System.Windows.Forms.NumericUpDown();
+            this.iPG1_TB_Search_ByAddress = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.iPG1_BT_Search_ByAddress = new System.Windows.Forms.Button();
+            this.iPG2_CellList = new System.Windows.Forms.TabPage();
+            this.iPG2_SplitCon = new System.Windows.Forms.SplitContainer();
+            this.iPG3_Objects = new System.Windows.Forms.TabPage();
+            this.iPG3_SplitCon = new System.Windows.Forms.SplitContainer();
+            this.groupBox7 = new System.Windows.Forms.GroupBox();
+            this.groupBox8 = new System.Windows.Forms.GroupBox();
+            this.iPG3_ObjectPieChart = new ZedGraph.ZedGraphControl();
+            this.iPG6_Relationships = new System.Windows.Forms.TabPage();
+            this.iPG5_Distribution = new System.Windows.Forms.TabPage();
+            this.iPG4_Graphs = new System.Windows.Forms.TabPage();
+            this.iPG4_GraphCtrl = new ZedGraph.ZedGraphControl();
+            this.groupBox2 = new System.Windows.Forms.GroupBox();
+            this.iPG4_RB_GraphType_AssociatedBinary = new System.Windows.Forms.RadioButton();
+            this.iPG4_RB_GraphType_SizeByIndex = new System.Windows.Forms.RadioButton();
+            this.iPG4_RB_GraphType_CellSizeFree = new System.Windows.Forms.RadioButton();
+            this.iPG4_RB_GraphType_CellSizeAllocated = new System.Windows.Forms.RadioButton();
+            this.iPG4_RB_GraphType_CellOverhead = new System.Windows.Forms.RadioButton();
+            this.iTab2_ColModel_Stats = new XPTable.Models.ColumnModel();
+            this.iTab2_ColModel_Stats_Col_Symbol = new XPTable.Models.TextColumn();
+            this.iTab2_ColModel_Stats_Col_AllocationCount = new XPTable.Models.TextColumn();
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance = new XPTable.Models.TextColumn();
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory = new XPTable.Models.TextColumn();
+            this.iTab2_TabModel_Stats = new XPTable.Models.TableModel();
+            this.iPG5_TableModel_CellDistributionFree = new XPTable.Models.TableModel();
+            this.iPG5_TableModel_CellDistributionAllocated = new XPTable.Models.TableModel();
+            this.iPG1_HeapView_ContextMenu = new System.Windows.Forms.ContextMenuStrip( this.components );
+            this.iPopupMenu_Relationships = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Outgoing = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Outgoing_View = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Incoming = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Incoming_View = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_Show = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Show = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Show_CellRelationshipInspector = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_Show_CellContentsViewer = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_XRef = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_XRef_Settings = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_GoTo = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_GoTo_EmbeddedReferences = new System.Windows.Forms.ToolStripMenuItem();
+            this.iPopupMenu_GoTo_IncomingReferences = new System.Windows.Forms.ToolStripMenuItem();
+            this.iToolTip = new System.Windows.Forms.ToolTip( this.components );
+            this.iMenuItem_File_SaveAs_HTML = new System.Windows.Forms.MenuItem();
+            this.iPG1_HeapCellInfo = new HeapUiLib.Controls.HeapCellInfoControl();
+            this.iPG2_FilterControl = new HeapUiLib.Controls.HeapCellListingFilter();
+            this.iPG2_CellList_Cells = new HeapUiLib.Controls.HeapCellListingControl();
+            this.iPG3_StatsControl = new HeapUiLib.Controls.HeapCellStatsControl();
+            this.iPG6_RelationshipControl = new HeapUiLib.Controls.HeapCellRelationshipControl();
+            this.iPG4_DistributionControl = new HeapUiLib.Controls.HeapCellSizeDistributionControl();
+            this.iPanel_Main.SuspendLayout();
+            this.iTabs.SuspendLayout();
+            this.iPG1_HeapView.SuspendLayout();
+            this.iPG1_SplitCon.Panel1.SuspendLayout();
+            this.iPG1_SplitCon.Panel2.SuspendLayout();
+            this.iPG1_SplitCon.SuspendLayout();
+            this.iPG1_TLP_Top.SuspendLayout();
+            this.iPG1_FLP_Top.SuspendLayout();
+            this.groupBox1.SuspendLayout();
+            this.groupBox5.SuspendLayout();
+            this.iPG1_TLP_Bottom.SuspendLayout();
+            this.groupBox6.SuspendLayout();
+            this.iPG1_FLP_NavigateAndSearch.SuspendLayout();
+            this.groupBox4.SuspendLayout();
+            this.iPG1_GP_Navigate_ByAllocNumber.SuspendLayout();
+            this.groupBox3.SuspendLayout();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iPG1_NumUD_Search_ByAllocNumber ) ).BeginInit();
+            this.iPG2_CellList.SuspendLayout();
+            this.iPG2_SplitCon.Panel1.SuspendLayout();
+            this.iPG2_SplitCon.Panel2.SuspendLayout();
+            this.iPG2_SplitCon.SuspendLayout();
+            this.iPG3_Objects.SuspendLayout();
+            this.iPG3_SplitCon.Panel1.SuspendLayout();
+            this.iPG3_SplitCon.Panel2.SuspendLayout();
+            this.iPG3_SplitCon.SuspendLayout();
+            this.groupBox7.SuspendLayout();
+            this.groupBox8.SuspendLayout();
+            this.iPG6_Relationships.SuspendLayout();
+            this.iPG5_Distribution.SuspendLayout();
+            this.iPG4_Graphs.SuspendLayout();
+            this.groupBox2.SuspendLayout();
+            this.iPG1_HeapView_ContextMenu.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // iTimer_CreateToolBoxItems
+            // 
+            this.iTimer_CreateToolBoxItems.Enabled = true;
+            this.iTimer_CreateToolBoxItems.Interval = 50;
+            this.iTimer_CreateToolBoxItems.Tick += new System.EventHandler( this.iTimer_CreateToolBoxItems_Tick );
+            // 
+            // iMainMenu
+            // 
+            this.iMainMenu.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_File,
+            this.iMenuItem_View,
+            this.iMenuItem_Help} );
+            // 
+            // iMenuItem_File
+            // 
+            this.iMenuItem_File.Index = 0;
+            this.iMenuItem_File.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_File_SaveAs,
+            this.menuItem6,
+            this.iMenuItem_File_Exit} );
+            this.iMenuItem_File.Text = "&File";
+            // 
+            // iMenuItem_File_SaveAs
+            // 
+            this.iMenuItem_File_SaveAs.Index = 0;
+            this.iMenuItem_File_SaveAs.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_File_SaveAs_Zip,
+            this.iMenuItem_File_SaveAs_CSV,
+            this.iMenuItem_File_SaveAs_Text,
+            this.iMenuItem_File_SaveAs_HTML} );
+            this.iMenuItem_File_SaveAs.Text = "Save &As...";
+            // 
+            // iMenuItem_File_SaveAs_Zip
+            // 
+            this.iMenuItem_File_SaveAs_Zip.Index = 0;
+            this.iMenuItem_File_SaveAs_Zip.Text = "As &Zip...";
+            this.iMenuItem_File_SaveAs_Zip.Click += new System.EventHandler( this.iMenuItem_File_SaveAs_Zip_Click );
+            // 
+            // iMenuItem_File_SaveAs_CSV
+            // 
+            this.iMenuItem_File_SaveAs_CSV.Index = 1;
+            this.iMenuItem_File_SaveAs_CSV.Text = "As &CSV...";
+            this.iMenuItem_File_SaveAs_CSV.Click += new System.EventHandler( this.iMenuItem_File_SaveAs_CSV_Click );
+            // 
+            // iMenuItem_File_SaveAs_Text
+            // 
+            this.iMenuItem_File_SaveAs_Text.Index = 2;
+            this.iMenuItem_File_SaveAs_Text.Text = "As &Text...";
+            this.iMenuItem_File_SaveAs_Text.Click += new System.EventHandler( this.iMenuItem_File_SaveAs_Text_Click );
+            // 
+            // menuItem6
+            // 
+            this.menuItem6.Index = 1;
+            this.menuItem6.Text = "-";
+            // 
+            // iMenuItem_File_Exit
+            // 
+            this.iMenuItem_File_Exit.Index = 2;
+            this.iMenuItem_File_Exit.Text = "E&xit";
+            this.iMenuItem_File_Exit.Click += new System.EventHandler( this.iMenuItem_File_Exit_Click );
+            // 
+            // iMenuItem_View
+            // 
+            this.iMenuItem_View.Index = 1;
+            this.iMenuItem_View.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_View_Show,
+            this.iMenuItem_View_Type,
+            this.iMenuItem_View_Zoom} );
+            this.iMenuItem_View.Text = "&View";
+            // 
+            // iMenuItem_View_Show
+            // 
+            this.iMenuItem_View_Show.Index = 0;
+            this.iMenuItem_View_Show.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_View_Show_RelationshipInspector,
+            this.iMenuItem_View_Show_CellContentsViewer} );
+            this.iMenuItem_View_Show.Text = "&Show";
+            // 
+            // iMenuItem_View_Show_RelationshipInspector
+            // 
+            this.iMenuItem_View_Show_RelationshipInspector.Index = 0;
+            this.iMenuItem_View_Show_RelationshipInspector.Text = "Cell Relationship &Inspector";
+            this.iMenuItem_View_Show_RelationshipInspector.Click += new System.EventHandler( this.iMenuItem_View_Show_RelationshipInspector_Click );
+            // 
+            // iMenuItem_View_Show_CellContentsViewer
+            // 
+            this.iMenuItem_View_Show_CellContentsViewer.Index = 1;
+            this.iMenuItem_View_Show_CellContentsViewer.Text = "Cell &Contents Viewer";
+            this.iMenuItem_View_Show_CellContentsViewer.Click += new System.EventHandler( this.iMenuItem_View_Show_CellContentsViewer_Click );
+            // 
+            // iMenuItem_View_Type
+            // 
+            this.iMenuItem_View_Type.Index = 1;
+            this.iMenuItem_View_Type.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_View_Type_Cell,
+            this.iMenuItem_View_Type_Object,
+            this.iMenuItem_View_Type_ParentBinary,
+            this.iMenuItem_View_Type_Length,
+            this.iMenuItem_View_Type_Isolation,
+            this.iMenuItem_View_Type_EmbeddedReferences,
+            this.iMenuItem_View_Type_Age} );
+            this.iMenuItem_View_Type.Text = "&Type";
+            // 
+            // iMenuItem_View_Type_Cell
+            // 
+            this.iMenuItem_View_Type_Cell.Index = 0;
+            this.iMenuItem_View_Type_Cell.Text = "...by &Cell Type";
+            this.iMenuItem_View_Type_Cell.Click += new System.EventHandler( this.iMenuItem_View_Type_Cell_Click );
+            // 
+            // iMenuItem_View_Type_Object
+            // 
+            this.iMenuItem_View_Type_Object.Index = 1;
+            this.iMenuItem_View_Type_Object.Text = "...by &Object Type";
+            this.iMenuItem_View_Type_Object.Click += new System.EventHandler( this.iMenuItem_View_Type_Object_Click );
+            // 
+            // iMenuItem_View_Type_ParentBinary
+            // 
+            this.iMenuItem_View_Type_ParentBinary.Index = 2;
+            this.iMenuItem_View_Type_ParentBinary.Text = "...by Parent &Binary";
+            this.iMenuItem_View_Type_ParentBinary.Click += new System.EventHandler( this.iMenuItem_View_Type_ParentBinary_Click );
+            // 
+            // iMenuItem_View_Type_Length
+            // 
+            this.iMenuItem_View_Type_Length.Index = 3;
+            this.iMenuItem_View_Type_Length.Text = "...by Cell &Length";
+            this.iMenuItem_View_Type_Length.Click += new System.EventHandler( this.iMenuItem_View_Type_Length_Click );
+            // 
+            // iMenuItem_View_Type_Isolation
+            // 
+            this.iMenuItem_View_Type_Isolation.Index = 4;
+            this.iMenuItem_View_Type_Isolation.Text = "...by Isolation";
+            this.iMenuItem_View_Type_Isolation.Click += new System.EventHandler( this.iMenuItem_View_Type_Isolation_Click );
+            // 
+            // iMenuItem_View_Type_EmbeddedReferences
+            // 
+            this.iMenuItem_View_Type_EmbeddedReferences.Index = 5;
+            this.iMenuItem_View_Type_EmbeddedReferences.Text = "...by Pervasiveness";
+            this.iMenuItem_View_Type_EmbeddedReferences.Click += new System.EventHandler( this.iMenuItem_View_Type_EmbeddedReferences_Click );
+            // 
+            // iMenuItem_View_Type_Age
+            // 
+            this.iMenuItem_View_Type_Age.Index = 6;
+            this.iMenuItem_View_Type_Age.Text = "...by Cell &Age";
+            this.iMenuItem_View_Type_Age.Click += new System.EventHandler( this.iMenuItem_View_Type_Age_Click );
+            // 
+            // iMenuItem_View_Zoom
+            // 
+            this.iMenuItem_View_Zoom.Index = 2;
+            this.iMenuItem_View_Zoom.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_View_Zoom_Small,
+            this.iMenuItem_View_Zoom_Medium,
+            this.iMenuItem_View_Zoom_Large} );
+            this.iMenuItem_View_Zoom.Text = "Si&ze";
+            // 
+            // iMenuItem_View_Zoom_Small
+            // 
+            this.iMenuItem_View_Zoom_Small.Index = 0;
+            this.iMenuItem_View_Zoom_Small.Text = "Small";
+            this.iMenuItem_View_Zoom_Small.Click += new System.EventHandler( this.iMenuItem_View_Zoom_Small_Click );
+            // 
+            // iMenuItem_View_Zoom_Medium
+            // 
+            this.iMenuItem_View_Zoom_Medium.Index = 1;
+            this.iMenuItem_View_Zoom_Medium.Text = "Medium";
+            this.iMenuItem_View_Zoom_Medium.Click += new System.EventHandler( this.iMenuItem_View_Zoom_Medium_Click );
+            // 
+            // iMenuItem_View_Zoom_Large
+            // 
+            this.iMenuItem_View_Zoom_Large.Index = 2;
+            this.iMenuItem_View_Zoom_Large.Text = "Large";
+            this.iMenuItem_View_Zoom_Large.Click += new System.EventHandler( this.iMenuItem_View_Zoom_Large_Click );
+            // 
+            // iMenuItem_Help
+            // 
+            this.iMenuItem_Help.Index = 2;
+            this.iMenuItem_Help.MenuItems.AddRange( new System.Windows.Forms.MenuItem[] {
+            this.iMenuItem_Help_About} );
+            this.iMenuItem_Help.Text = "&Help";
+            // 
+            // iMenuItem_Help_About
+            // 
+            this.iMenuItem_Help_About.Index = 0;
+            this.iMenuItem_Help_About.Text = "&About";
+            this.iMenuItem_Help_About.Click += new System.EventHandler( this.iMenuItem_Help_About_Click );
+            // 
+            // iPanel_Main
+            // 
+            this.iPanel_Main.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
+            this.iPanel_Main.Controls.Add( this.iTabs );
+            this.iPanel_Main.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPanel_Main.Location = new System.Drawing.Point( 0, 0 );
+            this.iPanel_Main.Name = "iPanel_Main";
+            this.iPanel_Main.Size = new System.Drawing.Size( 1031, 608 );
+            this.iPanel_Main.TabIndex = 7;
+            // 
+            // iTabs
+            // 
+            this.iTabs.Controls.Add( this.iPG1_HeapView );
+            this.iTabs.Controls.Add( this.iPG2_CellList );
+            this.iTabs.Controls.Add( this.iPG3_Objects );
+            this.iTabs.Controls.Add( this.iPG6_Relationships );
+            this.iTabs.Controls.Add( this.iPG5_Distribution );
+            this.iTabs.Controls.Add( this.iPG4_Graphs );
+            this.iTabs.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTabs.Location = new System.Drawing.Point( 0, 0 );
+            this.iTabs.Name = "iTabs";
+            this.iTabs.SelectedIndex = 0;
+            this.iTabs.Size = new System.Drawing.Size( 1027, 604 );
+            this.iTabs.TabIndex = 7;
+            // 
+            // iPG1_HeapView
+            // 
+            this.iPG1_HeapView.Controls.Add( this.iPG1_SplitCon );
+            this.iPG1_HeapView.Location = new System.Drawing.Point( 4, 22 );
+            this.iPG1_HeapView.Name = "iPG1_HeapView";
+            this.iPG1_HeapView.Padding = new System.Windows.Forms.Padding( 0, 2, 0, 0 );
+            this.iPG1_HeapView.Size = new System.Drawing.Size( 1019, 578 );
+            this.iPG1_HeapView.TabIndex = 0;
+            this.iPG1_HeapView.Text = "Heap View";
+            this.iPG1_HeapView.UseVisualStyleBackColor = true;
+            // 
+            // iPG1_SplitCon
+            // 
+            this.iPG1_SplitCon.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG1_SplitCon.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
+            this.iPG1_SplitCon.Location = new System.Drawing.Point( 0, 2 );
+            this.iPG1_SplitCon.Name = "iPG1_SplitCon";
+            this.iPG1_SplitCon.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // iPG1_SplitCon.Panel1
+            // 
+            this.iPG1_SplitCon.Panel1.Controls.Add( this.iPG1_TLP_Top );
+            // 
+            // iPG1_SplitCon.Panel2
+            // 
+            this.iPG1_SplitCon.Panel2.Controls.Add( this.iPG1_TLP_Bottom );
+            this.iPG1_SplitCon.Size = new System.Drawing.Size( 1019, 576 );
+            this.iPG1_SplitCon.SplitterDistance = 415;
+            this.iPG1_SplitCon.TabIndex = 32;
+            // 
+            // iPG1_TLP_Top
+            // 
+            this.iPG1_TLP_Top.ColumnCount = 1;
+            this.iPG1_TLP_Top.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iPG1_TLP_Top.Controls.Add( this.iPG1_FLP_Top, 0, 0 );
+            this.iPG1_TLP_Top.Controls.Add( this.iPG1_HeapView_Viewer, 0, 1 );
+            this.iPG1_TLP_Top.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG1_TLP_Top.Location = new System.Drawing.Point( 0, 0 );
+            this.iPG1_TLP_Top.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iPG1_TLP_Top.Name = "iPG1_TLP_Top";
+            this.iPG1_TLP_Top.RowCount = 2;
+            this.iPG1_TLP_Top.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Absolute, 55F ) );
+            this.iPG1_TLP_Top.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iPG1_TLP_Top.Size = new System.Drawing.Size( 1019, 415 );
+            this.iPG1_TLP_Top.TabIndex = 0;
+            // 
+            // iPG1_FLP_Top
+            // 
+            this.iPG1_FLP_Top.Controls.Add( this.groupBox1 );
+            this.iPG1_FLP_Top.Controls.Add( this.groupBox5 );
+            this.iPG1_FLP_Top.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG1_FLP_Top.Location = new System.Drawing.Point( 0, 0 );
+            this.iPG1_FLP_Top.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iPG1_FLP_Top.Name = "iPG1_FLP_Top";
+            this.iPG1_FLP_Top.Size = new System.Drawing.Size( 1019, 55 );
+            this.iPG1_FLP_Top.TabIndex = 0;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add( this.iPG1_RB_HeapView_ByCellType );
+            this.groupBox1.Controls.Add( this.iPG1_RB_HeapView_ByObjectType );
+            this.groupBox1.Controls.Add( this.iPG1_RB_HeapView_ByParentBinary );
+            this.groupBox1.Controls.Add( this.iPG1_RB_HeapView_ByCellLength );
+            this.groupBox1.Controls.Add( this.iPG1_RB_HeapView_ByEmbeddedReferences );
+            this.groupBox1.Controls.Add( this.iPG1_RB_HeapView_ByIsolation );
+            this.groupBox1.Controls.Add( this.iPG1_RB_HeapView_ByCellAge );
+            this.groupBox1.Location = new System.Drawing.Point( 3, 3 );
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size( 724, 48 );
+            this.groupBox1.TabIndex = 0;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = " View Type";
+            // 
+            // iPG1_RB_HeapView_ByCellType
+            // 
+            this.iPG1_RB_HeapView_ByCellType.AutoSize = true;
+            this.iPG1_RB_HeapView_ByCellType.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_RB_HeapView_ByCellType.Location = new System.Drawing.Point( 27, 19 );
+            this.iPG1_RB_HeapView_ByCellType.Name = "iPG1_RB_HeapView_ByCellType";
+            this.iPG1_RB_HeapView_ByCellType.Size = new System.Drawing.Size( 69, 17 );
+            this.iPG1_RB_HeapView_ByCellType.TabIndex = 0;
+            this.iPG1_RB_HeapView_ByCellType.Text = "Cell Type";
+            this.iToolTip.SetToolTip( this.iPG1_RB_HeapView_ByCellType, resources.GetString( "iPG1_RB_HeapView_ByCellType.ToolTip" ) );
+            this.iPG1_RB_HeapView_ByCellType.CheckedChanged += new System.EventHandler( this.iPG1_RB_HeapView_ViewType_CheckedChanged );
+            // 
+            // iPG1_RB_HeapView_ByObjectType
+            // 
+            this.iPG1_RB_HeapView_ByObjectType.AutoSize = true;
+            this.iPG1_RB_HeapView_ByObjectType.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_RB_HeapView_ByObjectType.Location = new System.Drawing.Point( 119, 19 );
+            this.iPG1_RB_HeapView_ByObjectType.Name = "iPG1_RB_HeapView_ByObjectType";
+            this.iPG1_RB_HeapView_ByObjectType.Size = new System.Drawing.Size( 84, 17 );
+            this.iPG1_RB_HeapView_ByObjectType.TabIndex = 0;
+            this.iPG1_RB_HeapView_ByObjectType.Text = "Object Type";
+            this.iToolTip.SetToolTip( this.iPG1_RB_HeapView_ByObjectType, resources.GetString( "iPG1_RB_HeapView_ByObjectType.ToolTip" ) );
+            this.iPG1_RB_HeapView_ByObjectType.CheckedChanged += new System.EventHandler( this.iPG1_RB_HeapView_ViewType_CheckedChanged );
+            // 
+            // iPG1_RB_HeapView_ByParentBinary
+            // 
+            this.iPG1_RB_HeapView_ByParentBinary.AutoSize = true;
+            this.iPG1_RB_HeapView_ByParentBinary.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_RB_HeapView_ByParentBinary.Location = new System.Drawing.Point( 225, 19 );
+            this.iPG1_RB_HeapView_ByParentBinary.Name = "iPG1_RB_HeapView_ByParentBinary";
+            this.iPG1_RB_HeapView_ByParentBinary.Size = new System.Drawing.Size( 90, 17 );
+            this.iPG1_RB_HeapView_ByParentBinary.TabIndex = 0;
+            this.iPG1_RB_HeapView_ByParentBinary.Text = "Parent Binary";
+            this.iToolTip.SetToolTip( this.iPG1_RB_HeapView_ByParentBinary, resources.GetString( "iPG1_RB_HeapView_ByParentBinary.ToolTip" ) );
+            this.iPG1_RB_HeapView_ByParentBinary.CheckedChanged += new System.EventHandler( this.iPG1_RB_HeapView_ViewType_CheckedChanged );
+            // 
+            // iPG1_RB_HeapView_ByCellLength
+            // 
+            this.iPG1_RB_HeapView_ByCellLength.AutoSize = true;
+            this.iPG1_RB_HeapView_ByCellLength.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_RB_HeapView_ByCellLength.Location = new System.Drawing.Point( 336, 19 );
+            this.iPG1_RB_HeapView_ByCellLength.Name = "iPG1_RB_HeapView_ByCellLength";
+            this.iPG1_RB_HeapView_ByCellLength.Size = new System.Drawing.Size( 78, 17 );
+            this.iPG1_RB_HeapView_ByCellLength.TabIndex = 0;
+            this.iPG1_RB_HeapView_ByCellLength.Text = "Cell Length";
+            this.iToolTip.SetToolTip( this.iPG1_RB_HeapView_ByCellLength, "A simple view that emphasises the length of the cell. \r\n\r\nThe darker the cell col" +
+                    "our appears, the large the cell." );
+            this.iPG1_RB_HeapView_ByCellLength.CheckedChanged += new System.EventHandler( this.iPG1_RB_HeapView_ViewType_CheckedChanged );
+            // 
+            // iPG1_RB_HeapView_ByEmbeddedReferences
+            // 
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.AutoSize = true;
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.Location = new System.Drawing.Point( 524, 19 );
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.Name = "iPG1_RB_HeapView_ByEmbeddedReferences";
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.Size = new System.Drawing.Size( 94, 17 );
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.TabIndex = 0;
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.Text = "Pervasiveness";
+            this.iToolTip.SetToolTip( this.iPG1_RB_HeapView_ByEmbeddedReferences, resources.GetString( "iPG1_RB_HeapView_ByEmbeddedReferences.ToolTip" ) );
+            this.iPG1_RB_HeapView_ByEmbeddedReferences.CheckedChanged += new System.EventHandler( this.iPG1_RB_HeapView_ViewType_CheckedChanged );
+            // 
+            // iPG1_RB_HeapView_ByIsolation
+            // 
+            this.iPG1_RB_HeapView_ByIsolation.AutoSize = true;
+            this.iPG1_RB_HeapView_ByIsolation.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_RB_HeapView_ByIsolation.Location = new System.Drawing.Point( 437, 19 );
+            this.iPG1_RB_HeapView_ByIsolation.Name = "iPG1_RB_HeapView_ByIsolation";
+            this.iPG1_RB_HeapView_ByIsolation.Size = new System.Drawing.Size( 66, 17 );
+            this.iPG1_RB_HeapView_ByIsolation.TabIndex = 0;
+            this.iPG1_RB_HeapView_ByIsolation.Text = "Isolation";
+            this.iToolTip.SetToolTip( this.iPG1_RB_HeapView_ByIsolation, resources.GetString( "iPG1_RB_HeapView_ByIsolation.ToolTip" ) );
+            this.iPG1_RB_HeapView_ByIsolation.CheckedChanged += new System.EventHandler( this.iPG1_RB_HeapView_ViewType_CheckedChanged );
+            // 
+            // iPG1_RB_HeapView_ByCellAge
+            // 
+            this.iPG1_RB_HeapView_ByCellAge.AutoSize = true;
+            this.iPG1_RB_HeapView_ByCellAge.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_RB_HeapView_ByCellAge.Location = new System.Drawing.Point( 641, 19 );
+            this.iPG1_RB_HeapView_ByCellAge.Name = "iPG1_RB_HeapView_ByCellAge";
+            this.iPG1_RB_HeapView_ByCellAge.Size = new System.Drawing.Size( 64, 17 );
+            this.iPG1_RB_HeapView_ByCellAge.TabIndex = 0;
+            this.iPG1_RB_HeapView_ByCellAge.Text = "Cell Age";
+            this.iToolTip.SetToolTip( this.iPG1_RB_HeapView_ByCellAge, resources.GetString( "iPG1_RB_HeapView_ByCellAge.ToolTip" ) );
+            this.iPG1_RB_HeapView_ByCellAge.CheckedChanged += new System.EventHandler( this.iPG1_RB_HeapView_ViewType_CheckedChanged );
+            // 
+            // groupBox5
+            // 
+            this.groupBox5.Controls.Add( this.iPG1_BT_HeapView_Filters );
+            this.groupBox5.Location = new System.Drawing.Point( 733, 3 );
+            this.groupBox5.Name = "groupBox5";
+            this.groupBox5.Size = new System.Drawing.Size( 101, 48 );
+            this.groupBox5.TabIndex = 1;
+            this.groupBox5.TabStop = false;
+            this.groupBox5.Text = "Filters";
+            // 
+            // iPG1_BT_HeapView_Filters
+            // 
+            this.iPG1_BT_HeapView_Filters.Location = new System.Drawing.Point( 15, 15 );
+            this.iPG1_BT_HeapView_Filters.Name = "iPG1_BT_HeapView_Filters";
+            this.iPG1_BT_HeapView_Filters.Size = new System.Drawing.Size( 71, 25 );
+            this.iPG1_BT_HeapView_Filters.TabIndex = 0;
+            this.iPG1_BT_HeapView_Filters.Text = "Set Filters";
+            this.iPG1_BT_HeapView_Filters.UseVisualStyleBackColor = true;
+            this.iPG1_BT_HeapView_Filters.Click += new System.EventHandler( this.iPG1_BT_HeapView_Filters_Click );
+            // 
+            // iPG1_HeapView_Viewer
+            // 
+            this.iPG1_HeapView_Viewer.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG1_HeapView_Viewer.FocusedCell = null;
+            this.iPG1_HeapView_Viewer.Location = new System.Drawing.Point( 3, 58 );
+            this.iPG1_HeapView_Viewer.Name = "iPG1_HeapView_Viewer";
+            this.iPG1_HeapView_Viewer.Padding = new System.Windows.Forms.Padding( 2 );
+            this.iPG1_HeapView_Viewer.Reconstructor = null;
+            this.iPG1_HeapView_Viewer.Size = new System.Drawing.Size( 1013, 354 );
+            this.iPG1_HeapView_Viewer.TabIndex = 25;
+            this.iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCtrlRenderingTypeByCell;
+            this.iPG1_HeapView_Viewer.Zoom = HeapCtrlLib.Types.THeapCtrlZoom.EHeapCtrlZoomMedium;
+            this.iPG1_HeapView_Viewer.CellSelected += new HeapCtrlLib.HeapDataControl.OnCellSelected( this.iPG1_HeapView_Viewer_CellSelected );
+            this.iPG1_HeapView_Viewer.CellDoubleClicked += new HeapCtrlLib.HeapDataControl.OnCellDoubleClicked( this.iPG1_HeapView_Viewer_CellDoubleClicked );
+            this.iPG1_HeapView_Viewer.CellRightClicked += new HeapCtrlLib.HeapDataControl.CellRightClickedHandler( this.iPG1_HeapView_Viewer_CellRightClicked );
+            this.iPG1_HeapView_Viewer.KeyDown += new System.Windows.Forms.KeyEventHandler( this.iPG1_HeapView_Viewer_KeyDown );
+            // 
+            // iPG1_TLP_Bottom
+            // 
+            this.iPG1_TLP_Bottom.ColumnCount = 2;
+            this.iPG1_TLP_Bottom.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iPG1_TLP_Bottom.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Absolute, 484F ) );
+            this.iPG1_TLP_Bottom.Controls.Add( this.groupBox6, 0, 0 );
+            this.iPG1_TLP_Bottom.Controls.Add( this.iPG1_FLP_NavigateAndSearch, 1, 0 );
+            this.iPG1_TLP_Bottom.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG1_TLP_Bottom.Location = new System.Drawing.Point( 0, 0 );
+            this.iPG1_TLP_Bottom.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iPG1_TLP_Bottom.Name = "iPG1_TLP_Bottom";
+            this.iPG1_TLP_Bottom.RowCount = 1;
+            this.iPG1_TLP_Bottom.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iPG1_TLP_Bottom.Size = new System.Drawing.Size( 1019, 157 );
+            this.iPG1_TLP_Bottom.TabIndex = 0;
+            // 
+            // groupBox6
+            // 
+            this.groupBox6.Controls.Add( this.iPG1_HeapCellInfo );
+            this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.groupBox6.Location = new System.Drawing.Point( 3, 3 );
+            this.groupBox6.Name = "groupBox6";
+            this.groupBox6.Size = new System.Drawing.Size( 529, 151 );
+            this.groupBox6.TabIndex = 24;
+            this.groupBox6.TabStop = false;
+            this.groupBox6.Text = "Information";
+            // 
+            // iPG1_FLP_NavigateAndSearch
+            // 
+            this.iPG1_FLP_NavigateAndSearch.Controls.Add( this.groupBox4 );
+            this.iPG1_FLP_NavigateAndSearch.Controls.Add( this.iPG1_GP_Navigate_ByAllocNumber );
+            this.iPG1_FLP_NavigateAndSearch.Controls.Add( this.groupBox3 );
+            this.iPG1_FLP_NavigateAndSearch.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
+            this.iPG1_FLP_NavigateAndSearch.Location = new System.Drawing.Point( 535, 0 );
+            this.iPG1_FLP_NavigateAndSearch.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iPG1_FLP_NavigateAndSearch.Name = "iPG1_FLP_NavigateAndSearch";
+            this.iPG1_FLP_NavigateAndSearch.Size = new System.Drawing.Size( 481, 152 );
+            this.iPG1_FLP_NavigateAndSearch.TabIndex = 31;
+            // 
+            // groupBox4
+            // 
+            this.groupBox4.Controls.Add( this.iPG1_BT_Navigate_ByPosition_Next );
+            this.groupBox4.Controls.Add( this.iPG1_BT_Navigate_ByPosition_Previous );
+            this.groupBox4.Location = new System.Drawing.Point( 3, 3 );
+            this.groupBox4.Name = "groupBox4";
+            this.groupBox4.Size = new System.Drawing.Size( 186, 48 );
+            this.groupBox4.TabIndex = 29;
+            this.groupBox4.TabStop = false;
+            this.groupBox4.Text = "Navigate by cell position";
+            // 
+            // iPG1_BT_Navigate_ByPosition_Next
+            // 
+            this.iPG1_BT_Navigate_ByPosition_Next.Location = new System.Drawing.Point( 97, 16 );
+            this.iPG1_BT_Navigate_ByPosition_Next.Name = "iPG1_BT_Navigate_ByPosition_Next";
+            this.iPG1_BT_Navigate_ByPosition_Next.Size = new System.Drawing.Size( 80, 24 );
+            this.iPG1_BT_Navigate_ByPosition_Next.TabIndex = 4;
+            this.iPG1_BT_Navigate_ByPosition_Next.Text = "Next";
+            this.iPG1_BT_Navigate_ByPosition_Next.Click += new System.EventHandler( this.iPG1_BT_Navigate_ByPosition_Next_Click );
+            // 
+            // iPG1_BT_Navigate_ByPosition_Previous
+            // 
+            this.iPG1_BT_Navigate_ByPosition_Previous.Location = new System.Drawing.Point( 9, 16 );
+            this.iPG1_BT_Navigate_ByPosition_Previous.Name = "iPG1_BT_Navigate_ByPosition_Previous";
+            this.iPG1_BT_Navigate_ByPosition_Previous.Size = new System.Drawing.Size( 80, 24 );
+            this.iPG1_BT_Navigate_ByPosition_Previous.TabIndex = 3;
+            this.iPG1_BT_Navigate_ByPosition_Previous.Text = "Previous";
+            this.iPG1_BT_Navigate_ByPosition_Previous.Click += new System.EventHandler( this.iPG1_BT_Navigate_ByPosition_Previous_Click );
+            // 
+            // iPG1_GP_Navigate_ByAllocNumber
+            // 
+            this.iPG1_GP_Navigate_ByAllocNumber.Controls.Add( this.iPG1_BT_Navigate_ByAllocNumber_Next );
+            this.iPG1_GP_Navigate_ByAllocNumber.Controls.Add( this.iPG1_BT_Navigate_ByAllocNumber_Previous );
+            this.iPG1_GP_Navigate_ByAllocNumber.Location = new System.Drawing.Point( 3, 57 );
+            this.iPG1_GP_Navigate_ByAllocNumber.Name = "iPG1_GP_Navigate_ByAllocNumber";
+            this.iPG1_GP_Navigate_ByAllocNumber.Size = new System.Drawing.Size( 186, 48 );
+            this.iPG1_GP_Navigate_ByAllocNumber.TabIndex = 30;
+            this.iPG1_GP_Navigate_ByAllocNumber.TabStop = false;
+            this.iPG1_GP_Navigate_ByAllocNumber.Text = "Navigate by allocation number";
+            // 
+            // iPG1_BT_Navigate_ByAllocNumber_Next
+            // 
+            this.iPG1_BT_Navigate_ByAllocNumber_Next.Location = new System.Drawing.Point( 97, 16 );
+            this.iPG1_BT_Navigate_ByAllocNumber_Next.Name = "iPG1_BT_Navigate_ByAllocNumber_Next";
+            this.iPG1_BT_Navigate_ByAllocNumber_Next.Size = new System.Drawing.Size( 80, 24 );
+            this.iPG1_BT_Navigate_ByAllocNumber_Next.TabIndex = 4;
+            this.iPG1_BT_Navigate_ByAllocNumber_Next.Text = "Next";
+            this.iPG1_BT_Navigate_ByAllocNumber_Next.Click += new System.EventHandler( this.iPG1_BT_Navigate_ByAllocNumber_Next_Click );
+            // 
+            // iPG1_BT_Navigate_ByAllocNumber_Previous
+            // 
+            this.iPG1_BT_Navigate_ByAllocNumber_Previous.Location = new System.Drawing.Point( 9, 16 );
+            this.iPG1_BT_Navigate_ByAllocNumber_Previous.Name = "iPG1_BT_Navigate_ByAllocNumber_Previous";
+            this.iPG1_BT_Navigate_ByAllocNumber_Previous.Size = new System.Drawing.Size( 80, 24 );
+            this.iPG1_BT_Navigate_ByAllocNumber_Previous.TabIndex = 3;
+            this.iPG1_BT_Navigate_ByAllocNumber_Previous.Text = "Previous";
+            this.iPG1_BT_Navigate_ByAllocNumber_Previous.Click += new System.EventHandler( this.iPG1_BT_Navigate_ByAllocNumber_Previous_Click );
+            // 
+            // groupBox3
+            // 
+            this.groupBox3.Controls.Add( this.iPG1_BT_Search_ByAllocNumber );
+            this.groupBox3.Controls.Add( this.iPG1_NumUD_Search_ByAllocNumber );
+            this.groupBox3.Controls.Add( this.iPG1_TB_Search_ByAddress );
+            this.groupBox3.Controls.Add( this.label3 );
+            this.groupBox3.Controls.Add( this.label4 );
+            this.groupBox3.Controls.Add( this.iPG1_BT_Search_ByAddress );
+            this.groupBox3.Location = new System.Drawing.Point( 195, 3 );
+            this.groupBox3.Name = "groupBox3";
+            this.groupBox3.Size = new System.Drawing.Size( 280, 80 );
+            this.groupBox3.TabIndex = 25;
+            this.groupBox3.TabStop = false;
+            this.groupBox3.Text = "Search...";
+            // 
+            // iPG1_BT_Search_ByAllocNumber
+            // 
+            this.iPG1_BT_Search_ByAllocNumber.Location = new System.Drawing.Point( 232, 45 );
+            this.iPG1_BT_Search_ByAllocNumber.Name = "iPG1_BT_Search_ByAllocNumber";
+            this.iPG1_BT_Search_ByAllocNumber.Size = new System.Drawing.Size( 32, 23 );
+            this.iPG1_BT_Search_ByAllocNumber.TabIndex = 6;
+            this.iPG1_BT_Search_ByAllocNumber.Text = "Go";
+            this.iPG1_BT_Search_ByAllocNumber.Click += new System.EventHandler( this.iPG1_BT_Search_ByAllocNumber_Click );
+            // 
+            // iPG1_NumUD_Search_ByAllocNumber
+            // 
+            this.iPG1_NumUD_Search_ByAllocNumber.Location = new System.Drawing.Point( 104, 46 );
+            this.iPG1_NumUD_Search_ByAllocNumber.Name = "iPG1_NumUD_Search_ByAllocNumber";
+            this.iPG1_NumUD_Search_ByAllocNumber.Size = new System.Drawing.Size( 120, 21 );
+            this.iPG1_NumUD_Search_ByAllocNumber.TabIndex = 5;
+            this.iPG1_NumUD_Search_ByAllocNumber.Value = new decimal( new int[] {
+            1,
+            0,
+            0,
+            0} );
+            this.iPG1_NumUD_Search_ByAllocNumber.KeyDown += new System.Windows.Forms.KeyEventHandler( this.iPG1_NumUD_Search_ByAllocNumber_KeyDown );
+            // 
+            // iPG1_TB_Search_ByAddress
+            // 
+            this.iPG1_TB_Search_ByAddress.Location = new System.Drawing.Point( 104, 20 );
+            this.iPG1_TB_Search_ByAddress.Name = "iPG1_TB_Search_ByAddress";
+            this.iPG1_TB_Search_ByAddress.Size = new System.Drawing.Size( 120, 21 );
+            this.iPG1_TB_Search_ByAddress.TabIndex = 4;
+            this.iPG1_TB_Search_ByAddress.Text = "0x00000000";
+            this.iPG1_TB_Search_ByAddress.KeyDown += new System.Windows.Forms.KeyEventHandler( this.iPG1_TB_Search_ByAddress_KeyDown );
+            // 
+            // label3
+            // 
+            this.label3.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.label3.Location = new System.Drawing.Point( 16, 22 );
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size( 72, 16 );
+            this.label3.TabIndex = 0;
+            this.label3.Text = "...by address:";
+            // 
+            // label4
+            // 
+            this.label4.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.label4.Location = new System.Drawing.Point( 16, 48 );
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size( 72, 16 );
+            this.label4.TabIndex = 0;
+            this.label4.Text = "...by alloc #:";
+            // 
+            // iPG1_BT_Search_ByAddress
+            // 
+            this.iPG1_BT_Search_ByAddress.Location = new System.Drawing.Point( 232, 19 );
+            this.iPG1_BT_Search_ByAddress.Name = "iPG1_BT_Search_ByAddress";
+            this.iPG1_BT_Search_ByAddress.Size = new System.Drawing.Size( 32, 23 );
+            this.iPG1_BT_Search_ByAddress.TabIndex = 3;
+            this.iPG1_BT_Search_ByAddress.Text = "Go";
+            this.iPG1_BT_Search_ByAddress.Click += new System.EventHandler( this.iPG1_BT_Search_ByAddress_Click );
+            // 
+            // iPG2_CellList
+            // 
+            this.iPG2_CellList.Controls.Add( this.iPG2_SplitCon );
+            this.iPG2_CellList.Location = new System.Drawing.Point( 4, 22 );
+            this.iPG2_CellList.Name = "iPG2_CellList";
+            this.iPG2_CellList.Padding = new System.Windows.Forms.Padding( 2 );
+            this.iPG2_CellList.Size = new System.Drawing.Size( 1019, 589 );
+            this.iPG2_CellList.TabIndex = 3;
+            this.iPG2_CellList.Text = "Cell List";
+            this.iPG2_CellList.UseVisualStyleBackColor = true;
+            // 
+            // iPG2_SplitCon
+            // 
+            this.iPG2_SplitCon.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG2_SplitCon.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
+            this.iPG2_SplitCon.IsSplitterFixed = true;
+            this.iPG2_SplitCon.Location = new System.Drawing.Point( 2, 2 );
+            this.iPG2_SplitCon.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iPG2_SplitCon.Name = "iPG2_SplitCon";
+            this.iPG2_SplitCon.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // iPG2_SplitCon.Panel1
+            // 
+            this.iPG2_SplitCon.Panel1.Controls.Add( this.iPG2_FilterControl );
+            this.iPG2_SplitCon.Panel1.Margin = new System.Windows.Forms.Padding( 2 );
+            this.iPG2_SplitCon.Panel1MinSize = 20;
+            // 
+            // iPG2_SplitCon.Panel2
+            // 
+            this.iPG2_SplitCon.Panel2.Controls.Add( this.iPG2_CellList_Cells );
+            this.iPG2_SplitCon.Size = new System.Drawing.Size( 1015, 585 );
+            this.iPG2_SplitCon.SplitterDistance = 20;
+            this.iPG2_SplitCon.TabIndex = 1;
+            // 
+            // iPG3_Objects
+            // 
+            this.iPG3_Objects.Controls.Add( this.iPG3_SplitCon );
+            this.iPG3_Objects.Location = new System.Drawing.Point( 4, 22 );
+            this.iPG3_Objects.Name = "iPG3_Objects";
+            this.iPG3_Objects.Padding = new System.Windows.Forms.Padding( 2 );
+            this.iPG3_Objects.Size = new System.Drawing.Size( 1019, 589 );
+            this.iPG3_Objects.TabIndex = 1;
+            this.iPG3_Objects.Text = "Objects";
+            this.iPG3_Objects.UseVisualStyleBackColor = true;
+            this.iPG3_Objects.Visible = false;
+            // 
+            // iPG3_SplitCon
+            // 
+            this.iPG3_SplitCon.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG3_SplitCon.Location = new System.Drawing.Point( 2, 2 );
+            this.iPG3_SplitCon.Name = "iPG3_SplitCon";
+            this.iPG3_SplitCon.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // iPG3_SplitCon.Panel1
+            // 
+            this.iPG3_SplitCon.Panel1.Controls.Add( this.groupBox7 );
+            // 
+            // iPG3_SplitCon.Panel2
+            // 
+            this.iPG3_SplitCon.Panel2.Controls.Add( this.groupBox8 );
+            this.iPG3_SplitCon.Size = new System.Drawing.Size( 1015, 585 );
+            this.iPG3_SplitCon.SplitterDistance = 311;
+            this.iPG3_SplitCon.TabIndex = 7;
+            // 
+            // groupBox7
+            // 
+            this.groupBox7.Controls.Add( this.iPG3_StatsControl );
+            this.groupBox7.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.groupBox7.Location = new System.Drawing.Point( 0, 0 );
+            this.groupBox7.Name = "groupBox7";
+            this.groupBox7.Padding = new System.Windows.Forms.Padding( 5, 0, 5, 5 );
+            this.groupBox7.Size = new System.Drawing.Size( 1015, 311 );
+            this.groupBox7.TabIndex = 1;
+            this.groupBox7.TabStop = false;
+            this.groupBox7.Text = "Statistics";
+            // 
+            // groupBox8
+            // 
+            this.groupBox8.Controls.Add( this.iPG3_ObjectPieChart );
+            this.groupBox8.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.groupBox8.Location = new System.Drawing.Point( 0, 0 );
+            this.groupBox8.Name = "groupBox8";
+            this.groupBox8.Padding = new System.Windows.Forms.Padding( 5, 0, 5, 5 );
+            this.groupBox8.Size = new System.Drawing.Size( 1015, 270 );
+            this.groupBox8.TabIndex = 7;
+            this.groupBox8.TabStop = false;
+            // 
+            // iPG3_ObjectPieChart
+            // 
+            this.iPG3_ObjectPieChart.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG3_ObjectPieChart.Location = new System.Drawing.Point( 5, 14 );
+            this.iPG3_ObjectPieChart.Name = "iPG3_ObjectPieChart";
+            this.iPG3_ObjectPieChart.ScrollGrace = 0;
+            this.iPG3_ObjectPieChart.ScrollMaxX = 0;
+            this.iPG3_ObjectPieChart.ScrollMaxY = 0;
+            this.iPG3_ObjectPieChart.ScrollMaxY2 = 0;
+            this.iPG3_ObjectPieChart.ScrollMinX = 0;
+            this.iPG3_ObjectPieChart.ScrollMinY = 0;
+            this.iPG3_ObjectPieChart.ScrollMinY2 = 0;
+            this.iPG3_ObjectPieChart.Size = new System.Drawing.Size( 1005, 251 );
+            this.iPG3_ObjectPieChart.TabIndex = 6;
+            // 
+            // iPG6_Relationships
+            // 
+            this.iPG6_Relationships.Controls.Add( this.iPG6_RelationshipControl );
+            this.iPG6_Relationships.Location = new System.Drawing.Point( 4, 22 );
+            this.iPG6_Relationships.Name = "iPG6_Relationships";
+            this.iPG6_Relationships.Size = new System.Drawing.Size( 1019, 589 );
+            this.iPG6_Relationships.TabIndex = 6;
+            this.iPG6_Relationships.Text = "Relationships";
+            this.iPG6_Relationships.UseVisualStyleBackColor = true;
+            // 
+            // iPG5_Distribution
+            // 
+            this.iPG5_Distribution.Controls.Add( this.iPG4_DistributionControl );
+            this.iPG5_Distribution.Location = new System.Drawing.Point( 4, 22 );
+            this.iPG5_Distribution.Name = "iPG5_Distribution";
+            this.iPG5_Distribution.Padding = new System.Windows.Forms.Padding( 3 );
+            this.iPG5_Distribution.Size = new System.Drawing.Size( 1019, 589 );
+            this.iPG5_Distribution.TabIndex = 5;
+            this.iPG5_Distribution.Text = "Cell Size Distributions";
+            this.iPG5_Distribution.UseVisualStyleBackColor = true;
+            // 
+            // iPG4_Graphs
+            // 
+            this.iPG4_Graphs.Controls.Add( this.iPG4_GraphCtrl );
+            this.iPG4_Graphs.Controls.Add( this.groupBox2 );
+            this.iPG4_Graphs.Location = new System.Drawing.Point( 4, 22 );
+            this.iPG4_Graphs.Name = "iPG4_Graphs";
+            this.iPG4_Graphs.Padding = new System.Windows.Forms.Padding( 0, 2, 0, 0 );
+            this.iPG4_Graphs.Size = new System.Drawing.Size( 1019, 589 );
+            this.iPG4_Graphs.TabIndex = 4;
+            this.iPG4_Graphs.Text = "Graphs";
+            this.iPG4_Graphs.UseVisualStyleBackColor = true;
+            // 
+            // iPG4_GraphCtrl
+            // 
+            this.iPG4_GraphCtrl.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iPG4_GraphCtrl.IsShowPointValues = true;
+            this.iPG4_GraphCtrl.Location = new System.Drawing.Point( 6, 49 );
+            this.iPG4_GraphCtrl.Name = "iPG4_GraphCtrl";
+            this.iPG4_GraphCtrl.ScrollGrace = 0;
+            this.iPG4_GraphCtrl.ScrollMaxX = 0;
+            this.iPG4_GraphCtrl.ScrollMaxY = 0;
+            this.iPG4_GraphCtrl.ScrollMaxY2 = 0;
+            this.iPG4_GraphCtrl.ScrollMinX = 0;
+            this.iPG4_GraphCtrl.ScrollMinY = 0;
+            this.iPG4_GraphCtrl.ScrollMinY2 = 0;
+            this.iPG4_GraphCtrl.Size = new System.Drawing.Size( 1007, 534 );
+            this.iPG4_GraphCtrl.TabIndex = 1;
+            // 
+            // groupBox2
+            // 
+            this.groupBox2.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.groupBox2.Controls.Add( this.iPG4_RB_GraphType_AssociatedBinary );
+            this.groupBox2.Controls.Add( this.iPG4_RB_GraphType_SizeByIndex );
+            this.groupBox2.Controls.Add( this.iPG4_RB_GraphType_CellSizeFree );
+            this.groupBox2.Controls.Add( this.iPG4_RB_GraphType_CellSizeAllocated );
+            this.groupBox2.Controls.Add( this.iPG4_RB_GraphType_CellOverhead );
+            this.groupBox2.Location = new System.Drawing.Point( 6, 5 );
+            this.groupBox2.Name = "groupBox2";
+            this.groupBox2.Size = new System.Drawing.Size( 1007, 38 );
+            this.groupBox2.TabIndex = 0;
+            this.groupBox2.TabStop = false;
+            // 
+            // iPG4_RB_GraphType_AssociatedBinary
+            // 
+            this.iPG4_RB_GraphType_AssociatedBinary.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG4_RB_GraphType_AssociatedBinary.Location = new System.Drawing.Point( 710, 13 );
+            this.iPG4_RB_GraphType_AssociatedBinary.Name = "iPG4_RB_GraphType_AssociatedBinary";
+            this.iPG4_RB_GraphType_AssociatedBinary.Size = new System.Drawing.Size( 144, 20 );
+            this.iPG4_RB_GraphType_AssociatedBinary.TabIndex = 1;
+            this.iPG4_RB_GraphType_AssociatedBinary.Text = "Associated Binary";
+            this.iPG4_RB_GraphType_AssociatedBinary.CheckedChanged += new System.EventHandler( this.iPG4_RB_GraphType_CheckedChanged );
+            // 
+            // iPG4_RB_GraphType_SizeByIndex
+            // 
+            this.iPG4_RB_GraphType_SizeByIndex.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG4_RB_GraphType_SizeByIndex.Location = new System.Drawing.Point( 115, 13 );
+            this.iPG4_RB_GraphType_SizeByIndex.Name = "iPG4_RB_GraphType_SizeByIndex";
+            this.iPG4_RB_GraphType_SizeByIndex.Size = new System.Drawing.Size( 144, 20 );
+            this.iPG4_RB_GraphType_SizeByIndex.TabIndex = 0;
+            this.iPG4_RB_GraphType_SizeByIndex.Text = "Size by Cell Index";
+            this.iPG4_RB_GraphType_SizeByIndex.CheckedChanged += new System.EventHandler( this.iPG4_RB_GraphType_CheckedChanged );
+            // 
+            // iPG4_RB_GraphType_CellSizeFree
+            // 
+            this.iPG4_RB_GraphType_CellSizeFree.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG4_RB_GraphType_CellSizeFree.Location = new System.Drawing.Point( 267, 13 );
+            this.iPG4_RB_GraphType_CellSizeFree.Name = "iPG4_RB_GraphType_CellSizeFree";
+            this.iPG4_RB_GraphType_CellSizeFree.Size = new System.Drawing.Size( 144, 20 );
+            this.iPG4_RB_GraphType_CellSizeFree.TabIndex = 0;
+            this.iPG4_RB_GraphType_CellSizeFree.Text = "Free Cell Size";
+            this.iPG4_RB_GraphType_CellSizeFree.CheckedChanged += new System.EventHandler( this.iPG4_RB_GraphType_CheckedChanged );
+            // 
+            // iPG4_RB_GraphType_CellSizeAllocated
+            // 
+            this.iPG4_RB_GraphType_CellSizeAllocated.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG4_RB_GraphType_CellSizeAllocated.Location = new System.Drawing.Point( 419, 13 );
+            this.iPG4_RB_GraphType_CellSizeAllocated.Name = "iPG4_RB_GraphType_CellSizeAllocated";
+            this.iPG4_RB_GraphType_CellSizeAllocated.Size = new System.Drawing.Size( 144, 20 );
+            this.iPG4_RB_GraphType_CellSizeAllocated.TabIndex = 0;
+            this.iPG4_RB_GraphType_CellSizeAllocated.Text = "Allocated Cell Size";
+            this.iPG4_RB_GraphType_CellSizeAllocated.CheckedChanged += new System.EventHandler( this.iPG4_RB_GraphType_CheckedChanged );
+            // 
+            // iPG4_RB_GraphType_CellOverhead
+            // 
+            this.iPG4_RB_GraphType_CellOverhead.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG4_RB_GraphType_CellOverhead.Location = new System.Drawing.Point( 579, 13 );
+            this.iPG4_RB_GraphType_CellOverhead.Name = "iPG4_RB_GraphType_CellOverhead";
+            this.iPG4_RB_GraphType_CellOverhead.Size = new System.Drawing.Size( 144, 20 );
+            this.iPG4_RB_GraphType_CellOverhead.TabIndex = 0;
+            this.iPG4_RB_GraphType_CellOverhead.Text = "Cell Overhead";
+            this.iPG4_RB_GraphType_CellOverhead.CheckedChanged += new System.EventHandler( this.iPG4_RB_GraphType_CheckedChanged );
+            // 
+            // iTab2_ColModel_Stats
+            // 
+            this.iTab2_ColModel_Stats.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iTab2_ColModel_Stats_Col_Symbol,
+            this.iTab2_ColModel_Stats_Col_AllocationCount,
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance,
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory} );
+            // 
+            // iTab2_ColModel_Stats_Col_Symbol
+            // 
+            this.iTab2_ColModel_Stats_Col_Symbol.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_Symbol.Text = "Symbol";
+            this.iTab2_ColModel_Stats_Col_Symbol.Width = 270;
+            // 
+            // iTab2_ColModel_Stats_Col_AllocationCount
+            // 
+            this.iTab2_ColModel_Stats_Col_AllocationCount.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_AllocationCount.Text = "Allocation Count";
+            this.iTab2_ColModel_Stats_Col_AllocationCount.Width = 100;
+            // 
+            // iTab2_ColModel_Stats_Col_MemoryPerInstance
+            // 
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance.Text = "Memory-per-Instance";
+            this.iTab2_ColModel_Stats_Col_MemoryPerInstance.Width = 100;
+            // 
+            // iTab2_ColModel_Stats_Col_TotalAllocatedMemory
+            // 
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory.ContentWidth = 0;
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory.Text = "Total Allocated Memory";
+            this.iTab2_ColModel_Stats_Col_TotalAllocatedMemory.Width = 110;
+            // 
+            // iPG1_HeapView_ContextMenu
+            // 
+            this.iPG1_HeapView_ContextMenu.Items.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_Relationships,
+            this.iPopupMenu_Show,
+            this.iPopupMenu_XRef,
+            this.iPopupMenu_GoTo} );
+            this.iPG1_HeapView_ContextMenu.Name = "iPG1_HeapView_ContextMenu";
+            this.iPG1_HeapView_ContextMenu.Size = new System.Drawing.Size( 150, 92 );
+            this.iPG1_HeapView_ContextMenu.Opening += new System.ComponentModel.CancelEventHandler( this.iPG1_HeapView_ContextMenu_Opening );
+            // 
+            // iPopupMenu_Relationships
+            // 
+            this.iPopupMenu_Relationships.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_Relationships_Outgoing,
+            this.iPopupMenu_Relationships_Incoming} );
+            this.iPopupMenu_Relationships.Name = "iPopupMenu_Relationships";
+            this.iPopupMenu_Relationships.Size = new System.Drawing.Size( 149, 22 );
+            this.iPopupMenu_Relationships.Text = "Relationships...";
+            // 
+            // iPopupMenu_Relationships_Outgoing
+            // 
+            this.iPopupMenu_Relationships_Outgoing.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_Relationships_Outgoing_View,
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs} );
+            this.iPopupMenu_Relationships_Outgoing.Name = "iPopupMenu_Relationships_Outgoing";
+            this.iPopupMenu_Relationships_Outgoing.Size = new System.Drawing.Size( 130, 22 );
+            this.iPopupMenu_Relationships_Outgoing.Text = "Outgoing...";
+            // 
+            // iPopupMenu_Relationships_Outgoing_View
+            // 
+            this.iPopupMenu_Relationships_Outgoing_View.Name = "iPopupMenu_Relationships_Outgoing_View";
+            this.iPopupMenu_Relationships_Outgoing_View.Size = new System.Drawing.Size( 148, 22 );
+            this.iPopupMenu_Relationships_Outgoing_View.Text = "View";
+            this.iPopupMenu_Relationships_Outgoing_View.Click += new System.EventHandler( this.iPopupMenu_Relationships_Outgoing_View_Click );
+            // 
+            // iPopupMenu_Relationships_Outgoing_Breadcrumbs
+            // 
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show,
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll} );
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs.Name = "iPopupMenu_Relationships_Outgoing_Breadcrumbs";
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs.Size = new System.Drawing.Size( 148, 22 );
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs.Text = "Breadcrumbs...";
+            // 
+            // iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show
+            // 
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show.Name = "iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show";
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show.Size = new System.Drawing.Size( 109, 22 );
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show.Text = "Show";
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show.Click += new System.EventHandler( this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show_Click );
+            // 
+            // iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll
+            // 
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll.Name = "iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll";
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll.Size = new System.Drawing.Size( 109, 22 );
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll.Text = "Hide All";
+            this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll.Click += new System.EventHandler( this.iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll_Click );
+            // 
+            // iPopupMenu_Relationships_Incoming
+            // 
+            this.iPopupMenu_Relationships_Incoming.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_Relationships_Incoming_View,
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs} );
+            this.iPopupMenu_Relationships_Incoming.Name = "iPopupMenu_Relationships_Incoming";
+            this.iPopupMenu_Relationships_Incoming.Size = new System.Drawing.Size( 130, 22 );
+            this.iPopupMenu_Relationships_Incoming.Text = "Incoming...";
+            // 
+            // iPopupMenu_Relationships_Incoming_View
+            // 
+            this.iPopupMenu_Relationships_Incoming_View.Name = "iPopupMenu_Relationships_Incoming_View";
+            this.iPopupMenu_Relationships_Incoming_View.Size = new System.Drawing.Size( 148, 22 );
+            this.iPopupMenu_Relationships_Incoming_View.Text = "View";
+            this.iPopupMenu_Relationships_Incoming_View.Click += new System.EventHandler( this.iPopupMenu_Relationships_Incoming_View_Click );
+            // 
+            // iPopupMenu_Relationships_Incoming_Breadcrumbs
+            // 
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_Show,
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll} );
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs.Name = "iPopupMenu_Relationships_Incoming_Breadcrumbs";
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs.Size = new System.Drawing.Size( 148, 22 );
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs.Text = "Breadcrumbs...";
+            // 
+            // iPopupMenu_Relationships_Incoming_Breadcrumbs_Show
+            // 
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_Show.Name = "iPopupMenu_Relationships_Incoming_Breadcrumbs_Show";
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_Show.Size = new System.Drawing.Size( 109, 22 );
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_Show.Text = "Show";
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_Show.Click += new System.EventHandler( this.iPopupMenu_Relationships_Incoming_Breadcrumbs_Show_Click );
+            // 
+            // iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll
+            // 
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll.Name = "iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll";
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll.Size = new System.Drawing.Size( 109, 22 );
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll.Text = "Hide All";
+            this.iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll.Click += new System.EventHandler( this.iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll_Click );
+            // 
+            // iPopupMenu_Show
+            // 
+            this.iPopupMenu_Show.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_Show_CellRelationshipInspector,
+            this.iPopupMenu_Show_CellContentsViewer} );
+            this.iPopupMenu_Show.Name = "iPopupMenu_Show";
+            this.iPopupMenu_Show.Size = new System.Drawing.Size( 149, 22 );
+            this.iPopupMenu_Show.Text = "Show...";
+            // 
+            // iPopupMenu_Show_CellRelationshipInspector
+            // 
+            this.iPopupMenu_Show_CellRelationshipInspector.Name = "iPopupMenu_Show_CellRelationshipInspector";
+            this.iPopupMenu_Show_CellRelationshipInspector.Size = new System.Drawing.Size( 201, 22 );
+            this.iPopupMenu_Show_CellRelationshipInspector.Text = "Cell Relationship Inspector";
+            this.iPopupMenu_Show_CellRelationshipInspector.Click += new System.EventHandler( this.iPopupMenu_Show_CellRelationshipInspector_Click );
+            // 
+            // iPopupMenu_Show_CellContentsViewer
+            // 
+            this.iPopupMenu_Show_CellContentsViewer.Name = "iPopupMenu_Show_CellContentsViewer";
+            this.iPopupMenu_Show_CellContentsViewer.Size = new System.Drawing.Size( 201, 22 );
+            this.iPopupMenu_Show_CellContentsViewer.Text = "Cell Contents Viewer";
+            this.iPopupMenu_Show_CellContentsViewer.Click += new System.EventHandler( this.iPopupMenu_Show_CellContentsViewer_Click );
+            // 
+            // iPopupMenu_XRef
+            // 
+            this.iPopupMenu_XRef.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_XRef_Settings} );
+            this.iPopupMenu_XRef.Name = "iPopupMenu_XRef";
+            this.iPopupMenu_XRef.Size = new System.Drawing.Size( 149, 22 );
+            this.iPopupMenu_XRef.Text = "X-Ref...";
+            // 
+            // iPopupMenu_XRef_Settings
+            // 
+            this.iPopupMenu_XRef_Settings.Font = new System.Drawing.Font( "Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iPopupMenu_XRef_Settings.Name = "iPopupMenu_XRef_Settings";
+            this.iPopupMenu_XRef_Settings.Size = new System.Drawing.Size( 130, 22 );
+            this.iPopupMenu_XRef_Settings.Text = "Settings...";
+            this.iPopupMenu_XRef_Settings.Click += new System.EventHandler( this.iPopupMenu_XRef_Settings_Click );
+            // 
+            // iPopupMenu_GoTo
+            // 
+            this.iPopupMenu_GoTo.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iPopupMenu_GoTo_EmbeddedReferences,
+            this.iPopupMenu_GoTo_IncomingReferences} );
+            this.iPopupMenu_GoTo.Name = "iPopupMenu_GoTo";
+            this.iPopupMenu_GoTo.Size = new System.Drawing.Size( 149, 22 );
+            this.iPopupMenu_GoTo.Text = "Go to...";
+            // 
+            // iPopupMenu_GoTo_EmbeddedReferences
+            // 
+            this.iPopupMenu_GoTo_EmbeddedReferences.Name = "iPopupMenu_GoTo_EmbeddedReferences";
+            this.iPopupMenu_GoTo_EmbeddedReferences.Size = new System.Drawing.Size( 183, 22 );
+            this.iPopupMenu_GoTo_EmbeddedReferences.Text = "Outgoing Reference...";
+            // 
+            // iPopupMenu_GoTo_IncomingReferences
+            // 
+            this.iPopupMenu_GoTo_IncomingReferences.Name = "iPopupMenu_GoTo_IncomingReferences";
+            this.iPopupMenu_GoTo_IncomingReferences.Size = new System.Drawing.Size( 183, 22 );
+            this.iPopupMenu_GoTo_IncomingReferences.Text = "Incoming Reference...";
+            // 
+            // iMenuItem_File_SaveAs_HTML
+            // 
+            this.iMenuItem_File_SaveAs_HTML.Index = 3;
+            this.iMenuItem_File_SaveAs_HTML.Text = "As &HTML...";
+            this.iMenuItem_File_SaveAs_HTML.Click += new System.EventHandler( this.iMenuItem_File_SaveAs_HTML_Click );
+            // 
+            // iPG1_HeapCellInfo
+            // 
+            this.iPG1_HeapCellInfo.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iPG1_HeapCellInfo.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG1_HeapCellInfo.Location = new System.Drawing.Point( 3, 12 );
+            this.iPG1_HeapCellInfo.MaximumSize = new System.Drawing.Size( 1024, 134 );
+            this.iPG1_HeapCellInfo.MinimumSize = new System.Drawing.Size( 387, 134 );
+            this.iPG1_HeapCellInfo.Name = "iPG1_HeapCellInfo";
+            this.iPG1_HeapCellInfo.ShowStackBasedFunctionAddresses = false;
+            this.iPG1_HeapCellInfo.Size = new System.Drawing.Size( 523, 134 );
+            this.iPG1_HeapCellInfo.TabIndex = 0;
+            // 
+            // iPG2_FilterControl
+            // 
+            this.iPG2_FilterControl.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG2_FilterControl.FilterType = HeapUiLib.Controls.TFilterType.EFilterShowAll;
+            this.iPG2_FilterControl.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG2_FilterControl.Location = new System.Drawing.Point( 0, 0 );
+            this.iPG2_FilterControl.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iPG2_FilterControl.MinimumSize = new System.Drawing.Size( 0, 25 );
+            this.iPG2_FilterControl.Name = "iPG2_FilterControl";
+            this.iPG2_FilterControl.Size = new System.Drawing.Size( 1015, 25 );
+            heapStatistics1.HeapBaseAddress = ( (uint) ( 4294967295u ) );
+            heapStatistics1.HeapSize = ( (uint) ( 1u ) );
+            this.iPG2_FilterControl.Statistics = heapStatistics1;
+            this.iPG2_FilterControl.TabIndex = 0;
+            this.iPG2_FilterControl.FilterChanged += new HeapUiLib.Controls.HeapCellListingFilter.FilterChangedHandler( this.iPG2_FilterControl_FilterChanged );
+            // 
+            // iPG2_CellList_Cells
+            // 
+            this.iPG2_CellList_Cells.Cells = heapCellArray1;
+            this.iPG2_CellList_Cells.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG2_CellList_Cells.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG2_CellList_Cells.Location = new System.Drawing.Point( 0, 0 );
+            this.iPG2_CellList_Cells.Name = "iPG2_CellList_Cells";
+            this.iPG2_CellList_Cells.SelectedCell = null;
+            this.iPG2_CellList_Cells.Size = new System.Drawing.Size( 1015, 561 );
+            this.iPG2_CellList_Cells.TabIndex = 1;
+            this.iPG2_CellList_Cells.DoubleClick += new System.EventHandler( this.iPG2_CellList_Cells_DoubleClick );
+            // 
+            // iPG3_StatsControl
+            // 
+            this.iPG3_StatsControl.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG3_StatsControl.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG3_StatsControl.Location = new System.Drawing.Point( 5, 14 );
+            this.iPG3_StatsControl.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iPG3_StatsControl.Name = "iPG3_StatsControl";
+            this.iPG3_StatsControl.Size = new System.Drawing.Size( 1005, 292 );
+            this.iPG3_StatsControl.TabIndex = 0;
+            // 
+            // iPG6_RelationshipControl
+            // 
+            this.iPG6_RelationshipControl.Cells = heapCellArray2;
+            this.iPG6_RelationshipControl.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG6_RelationshipControl.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG6_RelationshipControl.ListMode = HeapUiLib.Controls.HeapCellRelationshipControl.TListMode.EListModeReferencedBy;
+            this.iPG6_RelationshipControl.Location = new System.Drawing.Point( 0, 0 );
+            this.iPG6_RelationshipControl.Name = "iPG6_RelationshipControl";
+            this.iPG6_RelationshipControl.SelectedCell = null;
+            this.iPG6_RelationshipControl.Size = new System.Drawing.Size( 1019, 589 );
+            heapStatistics2.HeapBaseAddress = ( (uint) ( 4294967295u ) );
+            heapStatistics2.HeapSize = ( (uint) ( 1u ) );
+            this.iPG6_RelationshipControl.Statistics = heapStatistics2;
+            this.iPG6_RelationshipControl.TabIndex = 0;
+            this.iPG6_RelationshipControl.DoubleClick += new System.EventHandler( this.iPG6_RelationshipControl_DoubleClick );
+            // 
+            // iPG4_DistributionControl
+            // 
+            this.iPG4_DistributionControl.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG4_DistributionControl.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.iPG4_DistributionControl.Location = new System.Drawing.Point( 3, 3 );
+            this.iPG4_DistributionControl.Name = "iPG4_DistributionControl";
+            this.iPG4_DistributionControl.Size = new System.Drawing.Size( 1013, 583 );
+            this.iPG4_DistributionControl.TabIndex = 0;
+            // 
+            // HeapViewerForm
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 14 );
+            this.ClientSize = new System.Drawing.Size( 1031, 608 );
+            this.Controls.Add( this.iPanel_Main );
+            this.Font = new System.Drawing.Font( "Tahoma", 8.25F );
+            this.Menu = this.iMainMenu;
+            this.MinimumSize = new System.Drawing.Size( 1000, 642 );
+            this.Name = "HeapViewerForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Heap Analyser";
+            this.Load += new System.EventHandler( this.HeapViewerForm_Load );
+            this.Closing += new System.ComponentModel.CancelEventHandler( this.HeapViewerForm_Closing );
+            this.KeyDown += new System.Windows.Forms.KeyEventHandler( this.HeapViewerForm_KeyDown );
+            this.iPanel_Main.ResumeLayout( false );
+            this.iTabs.ResumeLayout( false );
+            this.iPG1_HeapView.ResumeLayout( false );
+            this.iPG1_SplitCon.Panel1.ResumeLayout( false );
+            this.iPG1_SplitCon.Panel2.ResumeLayout( false );
+            this.iPG1_SplitCon.ResumeLayout( false );
+            this.iPG1_TLP_Top.ResumeLayout( false );
+            this.iPG1_FLP_Top.ResumeLayout( false );
+            this.groupBox1.ResumeLayout( false );
+            this.groupBox1.PerformLayout();
+            this.groupBox5.ResumeLayout( false );
+            this.iPG1_TLP_Bottom.ResumeLayout( false );
+            this.groupBox6.ResumeLayout( false );
+            this.iPG1_FLP_NavigateAndSearch.ResumeLayout( false );
+            this.groupBox4.ResumeLayout( false );
+            this.iPG1_GP_Navigate_ByAllocNumber.ResumeLayout( false );
+            this.groupBox3.ResumeLayout( false );
+            this.groupBox3.PerformLayout();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iPG1_NumUD_Search_ByAllocNumber ) ).EndInit();
+            this.iPG2_CellList.ResumeLayout( false );
+            this.iPG2_SplitCon.Panel1.ResumeLayout( false );
+            this.iPG2_SplitCon.Panel2.ResumeLayout( false );
+            this.iPG2_SplitCon.ResumeLayout( false );
+            this.iPG3_Objects.ResumeLayout( false );
+            this.iPG3_SplitCon.Panel1.ResumeLayout( false );
+            this.iPG3_SplitCon.Panel2.ResumeLayout( false );
+            this.iPG3_SplitCon.ResumeLayout( false );
+            this.groupBox7.ResumeLayout( false );
+            this.groupBox8.ResumeLayout( false );
+            this.iPG6_Relationships.ResumeLayout( false );
+            this.iPG5_Distribution.ResumeLayout( false );
+            this.iPG4_Graphs.ResumeLayout( false );
+            this.groupBox2.ResumeLayout( false );
+            this.iPG1_HeapView_ContextMenu.ResumeLayout( false );
+            this.ResumeLayout( false );
+
+        }
+		#endregion
+
+		#region API
+		#endregion
+
+		#region Properties
+		public HeapReconstructor Reconstructor
+		{
+			get { return iReconstructor; }
+		}
+
+		public HeapCellArray CellCollection
+		{
+			get { return iReconstructor.Data; }
+		}
+
+		public HeapCell FocusedCell
+		{
+			get { return iPG1_HeapView_Viewer.FocusedCell; }
+            set { iPG1_HeapView_Viewer.FocusedCell = value; }
+		}
+		#endregion
+
+        #region Tab Pages
+
+        #region Page 1 - Heap View
+        private void SetupPage1()
+        {
+            // Update the heap viewer control with the reconstructor
+            iPG1_HeapView_Viewer.Reconstructor = iReconstructor;
+
+            // Can't use the "cell age" type if we don't have a debug
+            // allocator.
+            bool hideAge = iReconstructor.SourceData.MetaData.Heap.IsDebugAllocatorWithStoredStackAddresses || !iReconstructor.IsDebugAllocator;
+            if ( hideAge )
+            {
+                iMenuItem_View_Type.MenuItems.Remove( iMenuItem_View_Type_Age );
+                iPG1_RB_HeapView_ByCellAge.Enabled = false;
+            }
+
+            // Can't navigate by allocation number unless we have a debug allocator
+            iPG1_GP_Navigate_ByAllocNumber.Visible = iReconstructor.IsDebugAllocator && !iReconstructor.SourceData.MetaData.Heap.IsDebugAllocatorWithStoredStackAddresses;
+            iPG1_NumUD_Search_ByAllocNumber.Enabled = iReconstructor.IsDebugAllocator && !iReconstructor.SourceData.MetaData.Heap.IsDebugAllocatorWithStoredStackAddresses;
+            iPG1_BT_Search_ByAllocNumber.Enabled = iReconstructor.IsDebugAllocator && !iReconstructor.SourceData.MetaData.Heap.IsDebugAllocatorWithStoredStackAddresses;
+
+            // Make sure the heap view type is reset
+            iPG1_RB_HeapView_ByCellType.Checked = true;
+            iMenuItem_View_Zoom_Medium.Checked = true;
+            
+            // Seed alloc num
+            iPG1_NumUD_Search_ByAllocNumber.Minimum = 1;
+            iPG1_NumUD_Search_ByAllocNumber.Maximum = iReconstructor.Data.Count;
+
+            // If the heap data includes stack-based function addresses rather than 
+            // alloc number and nesting level, then change the list view text accordingly.
+            iPG1_HeapCellInfo.ShowStackBasedFunctionAddresses = iReconstructor.SourceData.MetaData.Heap.IsDebugAllocatorWithStoredStackAddresses;
+        }
+
+        private void iPG1_HeapView_Viewer_CellSelected( HeapLib.Cells.HeapCell aCell )
+        {
+            iPG1_HeapCellInfo.Cell = aCell;
+            iPG1_UpdateNavigationButtons();
+            //
+            if	( HeapCellSelectedObserver != null )
+            {
+                HeapCellSelectedObserver( aCell );
+            }
+        }
+
+        private void iPG1_HeapView_Viewer_CellDoubleClicked( HeapCell aCell )
+        {
+            // Create a new popup window for the double clicked cell's contents
+            HeapCellContentsForm popupContents = new HeapCellContentsForm( this, aCell );
+            popupContents.Show();
+        }
+
+        private void iPG1_HeapView_Viewer_CellRightClicked( HeapCell aCell, RawItem aItem, Point aScreenPos )
+        {
+            iPG1_HeapView_ContextMenu.Tag = new CellRightClickMetaData( aCell, aItem );
+            iPG1_HeapView_ContextMenu.Show( aScreenPos );
+        }
+
+        private void iPG1_BT_Navigate_ByPosition_Next_Click(object sender, System.EventArgs e)
+        {
+            HeapCell focusedCell = iPG1_HeapView_Viewer.FocusedCell;
+            if ( focusedCell != null )
+            {
+                int cellCount = iReconstructor.Data.Count;
+                int index = iReconstructor.Data.CellIndex( focusedCell );
+                if ( index + 1 < cellCount )
+                {
+                    HeapCell newFocusingCell = iReconstructor.Data[ index + 1 ];
+                    FocusedCell = newFocusingCell;
+                }
+            }
+        }
+
+        private void iPG1_BT_Navigate_ByPosition_Previous_Click(object sender, System.EventArgs e)
+        {
+            HeapCell focusedCell = iPG1_HeapView_Viewer.FocusedCell;
+            if  ( focusedCell != null )
+            {
+                int cellCount = iReconstructor.Data.Count;
+                int index = iReconstructor.Data.CellIndex( focusedCell );
+                if  ( index-1 >= 0 )
+                {
+                    HeapCell newFocusingCell = iReconstructor.Data[ index - 1 ];
+                    FocusedCell = newFocusingCell;
+                }
+            }
+        }
+
+        private void iPG1_BT_Navigate_ByAllocNumber_Next_Click(object sender, System.EventArgs e)
+        {
+            HeapCell focusedCell = iPG1_HeapView_Viewer.FocusedCell;
+            if  ( focusedCell != null )
+            {
+                uint allocNum = focusedCell.AllocationNumber;
+                HeapCell cell = iReconstructor.Data.CellByAllocationNumberIndexed( allocNum, 1 );
+                FocusedCell = cell;
+            }
+        }
+
+        private void iPG1_BT_Navigate_ByAllocNumber_Previous_Click(object sender, System.EventArgs e)
+        {
+            HeapCell focusedCell = iPG1_HeapView_Viewer.FocusedCell;
+            if  ( focusedCell != null )
+            {
+                uint allocNum = focusedCell.AllocationNumber;
+                HeapCell cell = iReconstructor.Data.CellByAllocationNumberIndexed( allocNum, -1 );
+                FocusedCell = cell;
+            }
+        }
+
+        private void iPG1_BT_HeapView_Filters_Click( object sender, EventArgs e )
+        {
+            iPG1_HeapView_Viewer.SetupFilters();
+        }
+
+        private void iPG1_BT_Search_ByAllocNumber_Click(object sender, System.EventArgs e)
+        {
+            // Find the starting address of the item that is specified
+            HeapCell cell = iReconstructor.Data.CellByAllocationNumber( (uint) iPG1_NumUD_Search_ByAllocNumber.Value );
+            if	( cell != null )
+            {
+                FocusedCell = cell;
+            }
+        }
+
+        private void iPG1_BT_Search_ByAddress_Click( object sender, System.EventArgs e )
+        {
+            // Convert the string to a number
+            string addressString = iPG1_TB_Search_ByAddress.Text;
+            long address;
+            NumberBaseUtils.TNumberBase numberBase;
+            if	( NumberBaseUtils.TextToDecimalNumber( ref addressString, out address, out numberBase ) )
+            {
+                HeapCell cell = iReconstructor.Data.CellByAddress( (uint) address );
+                if	( cell != null )
+                {
+                    FocusedCell = cell;
+                }
+            }
+        }
+
+        private void iPG1_TB_Search_ByAddress_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
+        {
+            if	( e.KeyCode == Keys.Enter )
+            {
+                iPG1_BT_Search_ByAddress_Click( this, System.EventArgs.Empty );
+                e.Handled = true;
+            }
+        }
+ 
+        private void iPG1_RB_HeapView_ViewType_CheckedChanged(object sender, System.EventArgs e)
+        {
+            HeapCtrlLib.Types.THeapCtrlRenderingType type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCtrlRenderingTypeByCell;
+            ClearAllMenuViewTypeCheckboxes();
+            //
+            if  ( iPG1_RB_HeapView_ByObjectType.Checked )
+            {
+                iMenuItem_View_Type_Object.Checked = true;
+                type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeBySymbol;
+            }
+            else if ( iPG1_RB_HeapView_ByParentBinary.Checked )
+            {
+                iMenuItem_View_Type_ParentBinary.Checked = true;
+                type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByObject;
+            }
+            else if ( iPG1_RB_HeapView_ByCellLength.Checked )
+            {
+                iMenuItem_View_Type_Length.Checked = true;
+                type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByLength;
+            }
+            else if ( iPG1_RB_HeapView_ByCellAge.Checked )
+            {
+                iMenuItem_View_Type_Age.Checked = true;
+                type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByAge;
+            }
+            else if ( iPG1_RB_HeapView_ByIsolation.Checked )
+            {
+                iMenuItem_View_Type_Isolation.Checked = true;
+                type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByIsolation;
+            }
+            else if ( iPG1_RB_HeapView_ByEmbeddedReferences.Checked )
+            {
+                iMenuItem_View_Type_EmbeddedReferences.Checked = true;
+                type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByEmbeddedReferences;
+            }
+            else
+            {
+                iMenuItem_View_Type_Cell.Checked = true;
+            }
+            
+            // Switch renderer type
+            iPG1_HeapView_Viewer.Type = type;
+
+            // Enable/disable filters button if supported
+            iPG1_BT_HeapView_Filters.Enabled = iPG1_HeapView_Viewer.SupportsFiltering;
+            
+        }
+
+        private void iPG1_NumUD_Search_ByAllocNumber_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
+        {
+            if	( e.KeyCode == Keys.Enter )
+            {
+                iPG1_BT_Search_ByAllocNumber_Click( this, System.EventArgs.Empty );
+                e.Handled = true;
+            }
+        }
+
+        private void iPG1_UpdateNavigationButtons()
+        {
+            HeapCell focusedCell = iPG1_HeapView_Viewer.FocusedCell;
+            if  ( focusedCell != null )
+            {
+                int index = iReconstructor.Data.CellIndex( focusedCell );
+                int count = iReconstructor.Data.Count;
+
+                // Navigate by cell index
+                iPG1_BT_Navigate_ByPosition_Previous.Enabled = ( index > 0 );
+                iPG1_BT_Navigate_ByPosition_Next.Enabled = ( index < count - 1 );
+
+                // Navigate by allocation number
+                if  ( iPG1_GP_Navigate_ByAllocNumber.Visible )
+                {
+                    bool isAllocCell = ( focusedCell.Type == HeapCell.TType.EAllocated );
+                    uint nextAllocNum  = focusedCell.AllocationNumber + 1;
+                    bool nextAvailable = iReconstructor.Data.AllocationNumberInRange( nextAllocNum );
+                    iPG1_BT_Navigate_ByAllocNumber_Next.Enabled = isAllocCell && nextAvailable; 
+                    //
+                    uint prevAllocNum  = focusedCell.AllocationNumber - 1;
+                    bool prevAvailable = iReconstructor.Data.AllocationNumberInRange( prevAllocNum );
+                    iPG1_BT_Navigate_ByAllocNumber_Previous.Enabled = isAllocCell && prevAvailable; 
+                }
+            }
+        }
+
+        private void ClearAllMenuViewTypeCheckboxes()
+        {
+            iMenuItem_View_Type_Cell.Checked = false;
+            iMenuItem_View_Type_Age.Checked = false;
+            iMenuItem_View_Type_Length.Checked = false;
+            iMenuItem_View_Type_Object.Checked = false;
+            iMenuItem_View_Type_ParentBinary.Checked = false;
+            iMenuItem_View_Type_EmbeddedReferences.Checked = false;
+            iMenuItem_View_Type_Isolation.Checked = false;
+        }
+
+        private void ClearAllMenuViewZoomCheckboxes()
+        {
+            iMenuItem_View_Zoom_Large.Checked = false;
+            iMenuItem_View_Zoom_Medium.Checked = false;
+            iMenuItem_View_Zoom_Small.Checked = false;
+        }
+        #endregion
+
+        #region Page 2 - Cell List
+        private void SetupPage2()
+        {
+            // Update the cell listing object with the list of heap cells
+            iPG2_CellList_Cells.Cells = iReconstructor.Data;
+
+            // Prepare filter list
+            iPG2_FilterControl.Statistics = iReconstructor.Statistics;
+        }
+
+        private void iPG2_FilterControl_FilterChanged( TFilterType aFilter, SymbianStructuresLib.Debug.Symbols.Symbol aSymbolOrNull )
+        {
+            if ( aSymbolOrNull != null )
+            {
+                iPG2_CellList_Cells.SetFilter( aFilter, aSymbolOrNull );
+            }
+            else
+            {
+                iPG2_CellList_Cells.SetFilter( aFilter );
+            }
+        }
+
+        private void iPG2_CellList_Cells_DoubleClick(object sender, System.EventArgs e)
+        {
+            HeapCell selectedCell = iPG2_CellList_Cells.SelectedCell;
+            if  ( selectedCell != null )
+            {
+                FocusedCell = selectedCell;
+                iTabs.SelectedTab = iPG1_HeapView;
+                iPG1_HeapView.Select();
+                iPG1_HeapView.Focus();
+            }
+        }
+
+        private void iPG2_CellList_Cells_KeyDown( object sender, System.Windows.Forms.KeyEventArgs e )
+        {
+            bool wasControl = ( e.Modifiers & Keys.Control ) == Keys.Control;
+            if	( wasControl && ( e.KeyCode == Keys.C ) )
+            {
+                iPG2_CellList_Cells.CopySelectedDataToClipboard();
+            }
+        }
+        #endregion
+
+        #region Page 3 - Object/Symbol Information
+        private void SetupPage3()
+        {
+            iPG3_StatsControl.Reconstructor = this.Reconstructor;
+            PrepareStatsGraph();
+        }
+
+		private void PrepareStatsGraph()
+		{
+			GraphPane myPane = iPG3_ObjectPieChart.GraphPane;
+
+			// Set the GraphPane title
+			myPane.Title.Text = "Top 10 Cell\nAllocation Distribution";
+            myPane.Title.FontSpec.Size = 20f;
+            myPane.Title.FontSpec.Family = "Verdana";
+
+			// Fill the pane background with a color gradient
+            myPane.Fill = new Fill( Color.White, Color.LightBlue, 45.0f );
+
+            // No fill for the chart background
+            myPane.Chart.Fill.Type = FillType.None;
+
+			// Set the legend to an arbitrary location
+			myPane.Legend.Position = LegendPos.Float ;
+			myPane.Legend.Location = new Location( 0.98f, 0.04f, CoordType.PaneFraction, AlignH.Right, AlignV.Top );
+			myPane.Legend.FontSpec.Size = 8f;
+			myPane.Legend.IsHStack = false;
+
+			// Find top ten memory allocations
+            SymbolTrackingInfoCollection topTen = new SymbolTrackingInfoCollection( iReconstructor.Statistics.StatsAllocated.TrackerSymbols );
+			topTen.SortByAllocatedMemory();
+
+            // If there are more than ten entries then discard the smallest ones
+            if	( topTen.Count > 10 )
+			{
+				int amountToRemove = topTen.Count - 10;
+				topTen.RemoveRange( 10, amountToRemove );
+			}
+
+			// Add some pie slices
+			System.Drawing.Color[] colors = 
+				{
+				Color.Navy,
+				Color.Purple,
+				Color.LimeGreen,
+				Color.SandyBrown,
+				Color.Red,
+				Color.Blue,
+				Color.Green,
+				Color.Pink,
+				Color.Yellow,
+				Color.Orange
+				};
+
+			int i = 0;
+            foreach( TrackingInfo item in topTen )
+            {
+				PieItem segment = myPane.AddPieSlice( (double) item.AssociatedMemory, colors[ i++ ], Color.White, 45f, 0, item.Symbol.NameWithoutVTablePrefix );
+			}
+			 
+			iPG3_ObjectPieChart.AxisChange();
+			iPG3_ObjectPieChart.Refresh();
+		}
+        #endregion
+
+        #region Page 4 - Graphs
+        private void SetupPage4()
+        {
+            iPG4_RB_GraphType_SizeByIndex.Checked = true;
+            iPG4_RB_GraphType_CheckedChanged( this, EventArgs.Empty );
+        }
+
+        private void iPG4_RB_GraphType_CheckedChanged( object aSender, System.EventArgs e )
+        {
+            if ( aSender is RadioButton )
+            {
+                RadioButton button = (RadioButton) aSender;
+                //
+                if ( button.Checked )
+                {
+                    Size size = iPG4_GraphCtrl.Size;
+                    Point pos = iPG4_GraphCtrl.Location;
+
+                    iPG4_GraphCtrl.Dispose();
+
+                    iPG4_Graphs.SuspendLayout();
+                    iPG4_GraphCtrl = new ZedGraphControl();
+                    iPG4_Graphs.Controls.Add( iPG4_GraphCtrl );
+                    iPG4_GraphCtrl.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+                    iPG4_GraphCtrl.Name = "iPG4_GraphCtrl";
+                    iPG4_GraphCtrl.Location = pos;
+                    iPG4_GraphCtrl.Size = size;
+                    iPG4_GraphCtrl.IsShowPointValues = true;
+                    iPG4_Graphs.ResumeLayout();
+
+                    GraphPane myPane = iPG4_GraphCtrl.GraphPane;
+
+                    if ( iPG4_RB_GraphType_SizeByIndex.Checked )
+                    {
+                        iPG4_PrepareGraph_SizeByIndex();
+                    }
+                    else if ( iPG4_RB_GraphType_CellSizeFree.Checked )
+                    {
+                        iPG4_PrepareGraph_CellSizeFree();
+                    }
+                    else if ( iPG4_RB_GraphType_CellSizeAllocated.Checked )
+                    {
+                        iPG4_PrepareGraph_CellSizeAllocated();
+                    }
+                    else if ( iPG4_RB_GraphType_CellOverhead.Checked )
+                    {
+                        iPG4_PrepareGraph_CellOverhead();
+                    }
+                    else if ( iPG4_RB_GraphType_AssociatedBinary.Checked )
+                    {
+                        iPG4_PrepareGraph_AssociatedBinary();
+                    }
+                }
+            }
+        }
+
+        private void iPG4_PrepareGraph_SizeByIndex()
+		{
+			GraphPane myPane = iPG4_GraphCtrl.GraphPane;
+            myPane.CurveList.Clear();
+            myPane.GraphObjList.Clear();
+
+			// Set the titles and axis labels
+			myPane.Title.Text = "Size by Index";
+            myPane.Title.FontSpec.Size = 16;
+            myPane.XAxis.Title.Text = "Index";
+			myPane.YAxis.Title.Text = "Allocation Size";
+            myPane.Legend.IsVisible = false;
+
+			// Build a PointPairList with points based on Sine wave
+			PointPairList cellsAllocated = new PointPairList();
+            PointPairList cellsFree = new PointPairList();
+
+			HeapCellArray data = iReconstructor.Data;
+			int count = data.Count;
+			for( int i=0; i<count; i++ )
+			{
+				HeapCell cell = data[ i ];
+				//
+				double x = (double) i;
+				double y = (double) cell.Length;
+				//
+                if ( cell.Type == HeapCell.TType.EAllocated )
+                {
+                    cellsAllocated.Add( x, y );
+                }
+                else if ( cell.Type == HeapCell.TType.EFree )
+                {
+                    cellsFree.Add( x, y );
+                }
+            }
+
+            // Generate a blue curve with diamond symbols, and "Free" in the legend
+            LineItem curveFree = myPane.AddCurve( "Free", cellsFree, Color.Blue, SymbolType.Diamond );
+            curveFree.Symbol.Size = 5;
+            curveFree.Symbol.Fill = new Fill( Color.DarkBlue, Color.LightBlue );
+            curveFree.Symbol.Fill.Type = FillType.GradientByY;
+            curveFree.Symbol.Fill.RangeMax = iReconstructor.Statistics.StatsFree.CellLargest.Length;
+            curveFree.Symbol.Fill.RangeMin = 0;
+            //curveFree.Symbol.Border.IsVisible = false;
+            curveFree.Line.IsVisible = false;
+
+            // Generate a red curve with diamond symbols, and "Free" in the legend
+            LineItem curveAllocated = myPane.AddCurve( "Allocated", cellsAllocated, Color.Red, SymbolType.Circle );
+            curveAllocated.Symbol.Size = 5;
+            curveAllocated.Symbol.Fill = new Fill( Color.LightPink, Color.DarkRed );
+            curveAllocated.Symbol.Fill.Type = FillType.GradientByY;
+            curveAllocated.Symbol.Fill.RangeMax = iReconstructor.Statistics.StatsAllocated.CellLargest.Length;
+            curveAllocated.Symbol.Fill.RangeMin = 0;
+            //curveAllocated.Symbol.Border.IsVisible = false;
+            curveAllocated.Line.IsVisible = false;
+
+            // Show the X and Y grids
+            myPane.XAxis.MajorGrid.IsVisible = true;
+            myPane.YAxis.MajorGrid.IsVisible = true;
+
+            // Set the x and y scale and title font sizes to 14
+            myPane.XAxis.Scale.FontSpec.Size = 14;
+            myPane.XAxis.Title.FontSpec.Size = 14;
+            myPane.YAxis.Scale.FontSpec.Size = 14;
+            myPane.YAxis.Title.FontSpec.Size = 14;
+
+            // Fill the axis background with a color gradient
+            myPane.Fill = new Fill( Color.White, Color.SteelBlue, 45.0F );
+            myPane.Chart.Fill = new Fill( Color.White, Color.Gainsboro, 90F );
+
+            iPG4_GraphCtrl.AxisChange();
+            iPG4_GraphCtrl.RestoreScale( myPane );
+
+            /*
+
+			// Hide the legend
+			myPane.Legend.IsVisible = false;
+
+			// Add a curve
+			LineItem curve = myPane.AddCurve( "label", list, Color.Red, SymbolType.Circle );
+			curve.Line.Width = 1.5F;
+			curve.Symbol.Fill = new Fill( Color.White );
+			curve.Symbol.Size = 5;
+
+			// Make the XAxis start with the first label at 50
+            myPane.XAxis.Scale.BaseTic = 50;
+
+            myPane.BarSettings.Type = BarType.Cluster;
+            myPane.BarSettings.Base = BarBase.X;
+			
+			// Fill the axis background with a gradient
+			myPane.Fill = new Fill( Color.White, Color.SteelBlue, 45.0F );
+
+            iPG4_GraphCtrl.Invalidate();
+             * */
+        }
+
+        private void iPG4_PrepareGraph_CellOverhead()
+        {
+            GraphPane myPane = iPG4_GraphCtrl.GraphPane;
+            myPane.CurveList.Clear();
+            myPane.GraphObjList.Clear();
+
+            // Set the title and axis labels
+            myPane.Title.Text = "Cell Overhead";
+            myPane.YAxis.Title.Text = "Type";
+            myPane.XAxis.Title.Text = "Size";
+			
+            // Y-axis labels
+            string[] yAxisLabels = { "Free", "Allocated (with Object)", "Allocated (Unknown)" };
+
+            double freeHeader = (double) iReconstructor.Statistics.StatsFree.TypeSizeHeader;
+            double freePayload = (double) iReconstructor.Statistics.StatsFree.TypeSizePayload;
+            double allocatedHeader = (double) iReconstructor.Statistics.StatsAllocated.TypeSizeHeader;
+            double allocatedPayload = (double) iReconstructor.Statistics.StatsAllocated.TypeSizePayload;
+
+            // We can work out the symbol vs no-symbol count based upon the tracker data.
+            double allocatedWithSymbolHeader = (double) ( iReconstructor.Statistics.StatsAllocated.TrackerSymbols.CellMatchCount * HeapCell.AllocatedCellHeaderSize );
+            double allocatedWithSymbolPayload = (double) ( iReconstructor.Statistics.StatsAllocated.TrackerSymbols.TypeSize - allocatedWithSymbolHeader );
+            double allocatedNoSymbolHeader = allocatedHeader - allocatedWithSymbolHeader;
+            double allocatedNoSymbolPayload = allocatedPayload - allocatedWithSymbolPayload;
+
+            double[] headerPoints = { freeHeader, allocatedWithSymbolHeader, allocatedNoSymbolHeader };
+            double[] payloadPoints = { freePayload, allocatedWithSymbolPayload, allocatedNoSymbolPayload };
+
+            // Shoiw the legend
+            myPane.Legend.IsVisible = true;
+
+            // x-axis curve one (red) - header size
+            BarItem myCurve = myPane.AddBar( "Header", headerPoints, null, Color.Red );
+            myCurve.Bar.Fill = new Fill( Color.Red, Color.White, Color.Red, 90f );
+
+            // x-axis curve one (blue) - payload size
+            myCurve = myPane.AddBar( "Payload", payloadPoints, null, Color.Blue );
+            myCurve.Bar.Fill = new Fill( Color.Blue, Color.White, Color.Blue, 90f );
+
+            // Draw the Y tics between the labels instead of at the labels
+            myPane.YAxis.MajorTic.IsAllTics = false;
+            myPane.YAxis.MajorTic.IsBetweenLabels = false;
+
+            // Set the YAxis labels
+            myPane.YAxis.Scale.TextLabels = yAxisLabels;
+
+            // Set the YAxis to Text type
+            myPane.YAxis.Type = AxisType.Text;
+
+            // Set the bar type to stack, which stacks the bars by automatically accumulating the values
+            myPane.BarSettings.Type = BarType.Stack;
+
+            // Make the bars horizontal by setting the BarBase to "Y"
+            myPane.BarSettings.Base = BarBase.Y;
+
+            // Fill the axis background with a color gradient
+            myPane.Fill = new Fill( Color.White, Color.SteelBlue, 45.0F );
+            myPane.Chart.Fill = new Fill( Color.White, Color.Gainsboro, 90F );
+
+            iPG4_GraphCtrl.AxisChange();
+
+            BarItem.CreateBarLabels( myPane, true, "f0" );
+        }
+
+        private void iPG4_PrepareGraph_CellSizeFree()
+        {
+            // get a reference to the GraphPane
+            GraphPane myPane = iPG4_GraphCtrl.GraphPane;
+            myPane.CurveList.Clear();
+            myPane.GraphObjList.Clear();
+
+            // Set the Titles
+            myPane.Title.Text = "Free Cell Length Distribution";
+            myPane.XAxis.Title.Text = "Cell Length";
+            myPane.YAxis.Title.Text = "Free Cell Count";
+
+            // Get distribution
+            HeapLib.Statistics.Distribution.HeapCellSizeDistribution distribution = iReconstructor.Statistics.StatsFree.Distribution;
+
+            PointPairList points = new PointPairList();
+            ArrayList labels = new ArrayList( distribution.Count );
+
+            int index = 1;
+            double maxCount = -1;
+            foreach( DictionaryEntry entry in distribution )
+            {
+                double cellLength = (double) ( (uint) entry.Key );
+                double matchingCells = (double) ( (uint) entry.Value );
+
+                maxCount = Math.Max( matchingCells, maxCount );
+
+                labels.Add( cellLength.ToString() );
+                labels.Add( string.Empty );
+                points.Add( index, matchingCells ); 
+                index += 2;
+            }
+
+            // Create the curve
+            BarItem myCurve = myPane.AddBar( string.Empty, points, Color.CadetBlue );
+            myCurve.IsOverrideOrdinal = true;
+            myCurve.Bar.Fill = new Fill( Color.Blue, Color.White, Color.Blue, 90f );
+
+            // Set up X-axis
+            myPane.XAxis.Type = AxisType.Text;
+            myPane.XAxis.Scale.TextLabels = (string[]) labels.ToArray( typeof( string ) );
+            myPane.XAxis.Scale.Min = 1;
+            myPane.XAxis.Scale.Max = (double) index + 2;
+            myPane.XAxis.Scale.MajorStep = 1;
+            myPane.XAxis.MinorTic.IsAllTics = false;
+            myPane.XAxis.MajorTic.IsAllTics = true;
+            myPane.YAxis.MajorTic.IsInside = false;
+            
+            // Set the extent of the Y-axis
+            myPane.YAxis.Scale.Min = 0;
+            myPane.YAxis.Scale.Max = maxCount + 20;
+            myPane.YAxis.Scale.MajorStep = 1;
+            myPane.YAxis.MinorTic.IsAllTics = false;
+            myPane.YAxis.MajorTic.IsBetweenLabels = false;
+            myPane.YAxis.MajorTic.IsAllTics = true;
+            myPane.YAxis.MajorTic.IsOutside = true;
+
+            myPane.BarSettings.Type = BarType.Cluster;
+            myPane.BarSettings.Base = BarBase.X;
+
+            // Show the X and Y grids
+            myPane.XAxis.MajorGrid.IsVisible = true;
+            myPane.YAxis.MajorGrid.IsVisible = true;
+
+            // Fill the axis background with a color gradient
+            myPane.Fill = new Fill( Color.White, Color.SteelBlue, 45.0F );
+            myPane.Chart.Fill = new Fill( Color.White, Color.Gainsboro, 90F );
+
+            // Asynch redraw request
+            iPG4_GraphCtrl.AxisChange();
+            iPG4_GraphCtrl.RestoreScale( myPane );
+        }
+
+        private void iPG4_PrepareGraph_CellSizeAllocated()
+        {
+            // get a reference to the GraphPane
+            GraphPane myPane = iPG4_GraphCtrl.GraphPane;
+            myPane.CurveList.Clear();
+            myPane.GraphObjList.Clear();
+
+            // Set the Titles
+            myPane.Title.Text = "Allocated Cell Length Distribution";
+            myPane.XAxis.Title.Text = "Cell Length";
+            myPane.YAxis.Title.Text = "Allocated Cell Count";
+
+            // Get distribution
+            HeapLib.Statistics.Distribution.HeapCellSizeDistribution distribution = iReconstructor.Statistics.StatsAllocated.Distribution;
+
+            PointPairList points = new PointPairList();
+            ArrayList labels = new ArrayList( distribution.Count );
+
+            int index = 1;
+            double maxCount = -1;
+            foreach ( DictionaryEntry entry in distribution )
+            {
+                double cellLength = (double) ( (uint) entry.Key );
+                double matchingCells = (double) ( (uint) entry.Value );
+
+                maxCount = Math.Max( matchingCells, maxCount );
+
+                labels.Add( cellLength.ToString() );
+                labels.Add( string.Empty );
+                points.Add( index, matchingCells );
+                index += 2;
+            }
+
+            // Create the curve
+            BarItem myCurve = myPane.AddBar( string.Empty, points, Color.CadetBlue );
+            myCurve.IsOverrideOrdinal = true;
+            myCurve.Bar.Fill = new Fill( Color.Red, Color.White, Color.Red, 90f );
+
+            // Set up X-axis
+            myPane.XAxis.Type = AxisType.Text;
+            myPane.XAxis.Scale.TextLabels = (string[]) labels.ToArray( typeof( string ) );
+            myPane.XAxis.Scale.Min = 1;
+            myPane.XAxis.Scale.Max = (double) index + 2;
+            myPane.XAxis.Scale.MajorStep = 1;
+            myPane.XAxis.MinorTic.IsAllTics = false;
+            myPane.XAxis.MajorTic.IsAllTics = true;
+            myPane.YAxis.MajorTic.IsInside = false;
+
+            // Set the extent of the Y-axis
+            myPane.YAxis.Scale.Min = 0;
+            myPane.YAxis.Scale.Max = maxCount + 20;
+            myPane.YAxis.Scale.MajorStep = 1;
+            myPane.YAxis.MinorTic.IsAllTics = false;
+            myPane.YAxis.MajorTic.IsAllTics = false;
+            myPane.YAxis.MajorTic.IsBetweenLabels = false;
+
+            myPane.BarSettings.Type = BarType.Cluster;
+            myPane.BarSettings.Base = BarBase.X;
+
+            // Show the X and Y grids
+            myPane.XAxis.MajorGrid.IsVisible = true;
+            myPane.YAxis.MajorGrid.IsVisible = true;
+
+            // Fill the axis background with a color gradient
+            myPane.Fill = new Fill( Color.White, Color.SteelBlue, 45.0F );
+            myPane.Chart.Fill = new Fill( Color.White, Color.Gainsboro, 90F );
+
+            // Asynch redraw request
+            iPG4_GraphCtrl.AxisChange();
+            iPG4_GraphCtrl.RestoreScale( myPane );
+        }
+
+        private void iPG4_PrepareGraph_AssociatedBinary()
+        {
+            GraphPane myPane = iPG4_GraphCtrl.GraphPane;
+            myPane.CurveList.Clear();
+            myPane.GraphObjList.Clear();
+
+            // Set the GraphPane title
+            myPane.Title.Text = "Allocated Cells\nby Asssociated Binary";
+            myPane.Title.FontSpec.Size = 20f;
+            myPane.Title.FontSpec.Family = "Verdana";
+
+            // Fill the pane background with a color gradient
+            myPane.Fill = new Fill( Color.White, Color.LightBlue, 45.0f );
+
+            // No fill for the chart background
+            myPane.Chart.Fill.Type = FillType.None;
+
+            // Set the legend to an arbitrary location
+            myPane.Legend.Position = LegendPos.Float;
+            myPane.Legend.Location = new Location( 0.99f, 0.01f, CoordType.PaneFraction, AlignH.Right, AlignV.Top );
+            myPane.Legend.FontSpec.Size = 8f;
+            myPane.Legend.IsHStack = false;
+
+            SymbianUtils.Colour.ColourGenerationUtil colorUtil = new SymbianUtils.Colour.ColourGenerationUtil();
+            colorUtil.SuplimentStandardColoursWithAdditionalEntries( iReconstructor.Statistics.StatsAllocated.TrackerObjects.Count + 1 );
+
+            // Calculate the 5% total amount. First we get the number of cells that had object(symbols)
+            // associated with them.
+            long totalObjectCount = iReconstructor.Statistics.StatsAllocated.TrackerObjects.CellMatchCount;
+
+            // Constants
+            const double KMinValueToShow = 0.01; // percent of total
+
+            // Then work out the 5% figure
+            double minValuePercentageTotal = (double) ( totalObjectCount * KMinValueToShow );
+
+            // Work out which is the largest entry
+            TrackingInfo largestItem = iReconstructor.Statistics.StatsAllocated.TrackerObjects.EntryWithLargestCount;
+
+            double othersAmount = 0.0;
+            int i = 0;
+            foreach ( TrackingInfo item in iReconstructor.Statistics.StatsAllocated.TrackerObjects )
+            {
+                // Get entry count
+                int entryCount = item.Count;
+
+                // If it contains more than 5% of the total, then include it, otherwise it gets
+                // stuck in the "Others" basket.
+                if ( entryCount >= minValuePercentageTotal )
+                {
+                    // Get colour for pie slice
+                    KnownColor kc = colorUtil.StandardColors[ i++ ];
+                    Color col = Color.FromKnownColor( kc );
+
+                    // Build label 
+                    string label = item.Symbol.ObjectWithoutSection;
+                    if ( !item.IsUnknownSymbolMatchItem )
+                    {
+                        label = label.ToUpper();
+                    }
+
+                    // Make item & set displacement for largest slice
+                    PieItem segment = myPane.AddPieSlice( (double) item.Count, col, Color.White, 45f, 0, label );
+                    if ( item == largestItem )
+                    {
+                        segment.Displacement = 0.1f;
+                    }
+                }
+                else
+                {
+                    othersAmount += entryCount;
+                }
+            }
+
+            // Create "others" entry
+            Color colOthers = Color.FromKnownColor( colorUtil.StandardColors[ i ] );
+            myPane.AddPieSlice( othersAmount, colOthers, Color.White, 45f, 0, "Others" );
+
+            iPG4_GraphCtrl.AxisChange();
+            iPG4_GraphCtrl.Refresh();
+        }
+        #endregion
+
+        #region Page 5 - Cell Distributions
+        private void SetupPage5()
+        {
+            iPG4_DistributionControl.Statistics = Reconstructor.Statistics;
+        }
+        #endregion
+
+        #region Page 6 - Relationships
+        private void SetupPage6()
+        {
+            iPG6_RelationshipControl.Cells = iReconstructor.Data;
+            iPG6_RelationshipControl.Statistics = iReconstructor.Statistics;
+        }
+
+        private void iPG6_RelationshipControl_DoubleClick( object sender, EventArgs e )
+        {
+            HeapCell selectedCell = iPG6_RelationshipControl.SelectedCell;
+            if ( selectedCell != null )
+            {
+                FocusedCell = selectedCell;
+                iTabs.SelectedTab = iPG1_HeapView;
+                iPG1_HeapView.Select();
+                iPG1_HeapView.Focus();
+            }
+        }
+        #endregion
+        
+        #endregion
+
+        #region Event handlers
+
+        #region Form loading/closing event handlers
+        private void HeapViewerForm_Load(object sender, System.EventArgs e)
+		{
+			// Set title based upon thread info
+            Text += " [ " + iReconstructor.SourceData.ThreadName + " ]";
+			//
+            SetupPage1();
+            SetupPage2();
+            SetupPage3();
+            SetupPage4();
+            SetupPage5();
+            SetupPage6();
+            //
+            CheckSourceForErrors( Reconstructor.SourceData );
+		}
+
+		private void HeapViewerForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+		{
+            iSettings.Save( "HeapViewerCellViewerForm", "iMenuItem_View_Show_RelationshipInspector", iMenuItem_View_Show_RelationshipInspector.Checked );
+            iSettings.Save( "HeapViewerCellViewerForm", "iMenuItem_View_Show_CellContentsViewer", iMenuItem_View_Show_CellContentsViewer.Checked );
+		}
+		#endregion
+
+        #region Menu event handlers
+        private void iMenuItem_File_SaveAs_Zip_Click(object sender, System.EventArgs e)
+		{
+			SaveFileDialog saveFileDialog = new SaveFileDialog();
+			saveFileDialog.Filter = "Zip file (*.zip)|*.zip"  ;
+			saveFileDialog.RestoreDirectory = true;
+			saveFileDialog.Title = "Save as Zip...";
+			saveFileDialog.OverwritePrompt = false;
+			//
+			DialogResult ret = saveFileDialog.ShowDialog();
+			//
+			if	( ret == DialogResult.OK )
+			{
+                string tempFileName = string.Empty;
+				string destinationFileName = saveFileDialog.FileName;
+
+                FileNamePairCollection sourceFiles = new FileNamePairCollection();
+
+				// Source data file
+				FileNamePair logFile = iReconstructor.SourceData.PrepareSourceFileDataForZip();
+				sourceFiles.Add( logFile );
+
+#if SAVE_TO_ZIP
+				// ROM Files
+                tempFileName = Path.GetTempFileName();
+                iReconstructor.SymbolManager.ROMEngine.SaveTaggedCollections( tempFileName );
+                FileNamePair romSymbolFile = new FileNamePair( tempFileName );
+                romSymbolFile.Destination = "/Symbols/" + Path.GetFileName( iReconstructor.SymbolManager.ROMEngine.FileName( 0 ) );
+                romSymbolFile.DeleteFile = true;
+                sourceFiles.Add( romSymbolFile );
+
+                // ROFS - Symbol files
+                int rofsSymbolCount = iReconstructor.SymbolManager.ROFSEngine.SymbolFiles.SymbolFileCount;
+                for ( int i = 0; i < rofsSymbolCount; i++ )
+                {
+                    GenericSymbolEngine rofsSymbolFileEngine = iReconstructor.SymbolManager.ROFSEngine.SymbolFiles.SymbolFileEngineAt( i );
+                    FileInfo fileInfo = new FileInfo( iReconstructor.SymbolManager.ROFSEngine.SymbolFiles.SymbolFileNames[ i ] );
+                    if ( fileInfo.Exists )
+                    {
+                        // Save symbols to temp file...
+                        tempFileName = Path.GetTempFileName();
+                        rofsSymbolFileEngine.SaveTaggedCollections( tempFileName );
+
+                        FileNamePair rofsFile = new FileNamePair( tempFileName );
+                        rofsFile.Destination = "/Symbols/" + Path.GetFileName( fileInfo.Name );
+                        rofsFile.DeleteFile = true;
+                        sourceFiles.Add( rofsFile );
+                    }
+                }
+
+                // ROFS - Map files
+                List<string> mapFiles = iReconstructor.SymbolManager.ROFSEngine.MapFileNames;
+                foreach( string mapFileName in mapFiles )
+                {
+                    FileNamePair mapFile = new FileNamePair( mapFileName );
+                    mapFile.SetCustomDestinationPath( "/Symbols/ROFS_Maps/" );
+                    sourceFiles.Add( mapFile );
+                }
+#endif
+
+                // Text representation
+                tempFileName = Path.GetTempFileName();
+                using ( StreamWriter stream = new StreamWriter( tempFileName, false ) )
+				{
+					stream.Write( iReconstructor.Data.ToString() );
+                    FileNamePair textHeap = new FileNamePair( tempFileName );
+                    textHeap.DeleteFile = true;
+                    textHeap.Destination = "/Output/Heap_AsText.txt";
+					sourceFiles.Add( textHeap  );
+				}
+
+				// CSV representation
+                tempFileName = Path.GetTempFileName();
+                using ( StreamWriter stream = new StreamWriter( tempFileName, false ) )
+				{
+					stream.Write( iReconstructor.Data.ToString() );
+                    FileNamePair csvHeap = new FileNamePair( tempFileName );
+                    csvHeap.DeleteFile = true;
+                    csvHeap.Destination = "/Output/Heap_AsCSV.csv";
+					sourceFiles.Add( csvHeap  );
+				}
+
+				ZipCompressionProgressDialog.CompressFiles( sourceFiles, destinationFileName );
+			}
+		}
+
+		private void iMenuItem_File_SaveAs_Text_Click(object sender, System.EventArgs e)
+		{
+			SaveFileDialog saveFileDialog = new SaveFileDialog();
+			saveFileDialog.Filter = "Text file (*.txt)|*.txt"  ;
+			saveFileDialog.RestoreDirectory = true;
+			saveFileDialog.Title = "Save as Text...";
+			saveFileDialog.OverwritePrompt = false;
+			//
+			DialogResult ret = saveFileDialog.ShowDialog();
+			//
+			if	( ret == DialogResult.OK )
+			{
+				string destinationFileName = saveFileDialog.FileName;
+
+				using( StreamWriter writer = new StreamWriter( destinationFileName, false ) )
+				{
+					writer.Write( iReconstructor.Data.ToString() );
+				}
+			}	
+		}
+
+		private void iMenuItem_File_SaveAs_CSV_Click(object sender, System.EventArgs e)
+		{
+			SaveFileDialog saveFileDialog = new SaveFileDialog();
+			saveFileDialog.Filter = "CSV file (*.csv)|*.csv"  ;
+			saveFileDialog.RestoreDirectory = true;
+			saveFileDialog.Title = "Save as CSV...";
+			saveFileDialog.OverwritePrompt = false;
+			//
+			DialogResult ret = saveFileDialog.ShowDialog();
+			//
+			if	( ret == DialogResult.OK )
+			{
+				string destinationFileName = saveFileDialog.FileName;
+
+				using( StreamWriter writer = new StreamWriter( destinationFileName, false ) )
+				{
+					writer.Write( iReconstructor.Data.ToCSV() );
+				}
+			}	
+		}
+
+        private void iMenuItem_File_SaveAs_HTML_Click( object sender, EventArgs e )
+        {
+            FolderBrowserDialog folderBrowser = new FolderBrowserDialog();
+            folderBrowser.Description = "Save HTML to...";
+            folderBrowser.ShowNewFolderButton = true;
+            //
+            DialogResult ret = folderBrowser.ShowDialog();
+            //
+            if ( ret == DialogResult.OK )
+            {
+                string path = folderBrowser.SelectedPath;
+                HeapExportToHTMLProgressDialog dialog = new HeapExportToHTMLProgressDialog( iReconstructor, path );
+                dialog.ShowDialog();
+           }
+        }
+
+		private void iMenuItem_File_Exit_Click(object sender, System.EventArgs e)
+		{
+			DialogResult = DialogResult.OK;
+			Close();
+		}
+
+		private void iMenuItem_View_Show_RelationshipInspector_Click(object sender, System.EventArgs e)
+		{
+			iMenuItem_View_Show_RelationshipInspector.Checked = !iMenuItem_View_Show_RelationshipInspector.Checked;
+			//
+            if ( iMenuItem_View_Show_RelationshipInspector.Checked && iForm_RelationshipInspector == null )
+			{
+                ShowFormCellRelationshipInspector();
+			}
+			else if ( iMenuItem_View_Show_RelationshipInspector.Checked == false )
+			{
+				if	( iForm_RelationshipInspector != null )
+				{
+                    iForm_RelationshipInspector.Close();
+				}
+                iForm_RelationshipInspector = null;
+			}
+		}
+
+		private void iMenuItem_View_Show_CellContentsViewer_Click(object sender, System.EventArgs e)
+		{
+			iMenuItem_View_Show_CellContentsViewer.Checked = !iMenuItem_View_Show_CellContentsViewer.Checked;
+			//
+			if	( iMenuItem_View_Show_CellContentsViewer.Checked && iForm_CellContents == null )
+			{
+				ShowFormCellViewer();
+			}
+			else if ( iMenuItem_View_Show_CellContentsViewer.Checked == false )
+			{
+				if	( iForm_CellContents != null )
+				{
+					iForm_CellContents.Close();
+				}
+				iForm_CellContents = null;
+			}
+		}
+
+        private void iMenuItem_View_Type_Cell_Click(object sender, System.EventArgs e)
+        {
+            ClearAllMenuViewTypeCheckboxes();
+            iPG1_RB_HeapView_ByCellAge.Checked = true;
+            iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCtrlRenderingTypeByCell;
+        }
+
+        private void iMenuItem_View_Type_Object_Click(object sender, System.EventArgs e)
+        {
+            ClearAllMenuViewTypeCheckboxes();
+            iPG1_RB_HeapView_ByObjectType.Checked = true;
+            iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeBySymbol;
+        }
+
+        private void iMenuItem_View_Type_ParentBinary_Click(object sender, System.EventArgs e)
+        {
+            ClearAllMenuViewTypeCheckboxes();
+            iPG1_RB_HeapView_ByParentBinary.Checked = true;
+            iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByObject;
+        }
+
+        private void iMenuItem_View_Type_Length_Click(object sender, System.EventArgs e)
+        {
+            ClearAllMenuViewTypeCheckboxes();
+            iPG1_RB_HeapView_ByCellLength.Checked = true;
+            iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByLength;
+        }
+
+        private void iMenuItem_View_Type_EmbeddedReferences_Click( object sender, EventArgs e )
+        {
+            ClearAllMenuViewTypeCheckboxes();
+            iPG1_RB_HeapView_ByEmbeddedReferences.Checked = true;
+            iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByEmbeddedReferences;
+        }
+
+        private void iMenuItem_View_Type_Isolation_Click( object sender, EventArgs e )
+        {
+            ClearAllMenuViewTypeCheckboxes();
+            iPG1_RB_HeapView_ByIsolation.Checked = true;
+            iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByIsolation;
+        }
+
+        private void iMenuItem_View_Type_Age_Click(object sender, System.EventArgs e)
+        {
+            ClearAllMenuViewTypeCheckboxes();
+            iPG1_RB_HeapView_ByCellAge.Checked = true;
+            iPG1_HeapView_Viewer.Type = HeapCtrlLib.Types.THeapCtrlRenderingType.EHeapCellRenderingTypeByAge;
+        }
+
+        private void iMenuItem_View_Zoom_Small_Click( object sender, EventArgs e )
+        {
+            ClearAllMenuViewZoomCheckboxes();
+            iMenuItem_View_Zoom_Small.Checked = true;
+            iPG1_HeapView_Viewer.Zoom = HeapCtrlLib.Types.THeapCtrlZoom.EHeapCtrlZoomSmall;
+        }
+
+        private void iMenuItem_View_Zoom_Medium_Click( object sender, EventArgs e )
+        {
+            ClearAllMenuViewZoomCheckboxes();
+            iMenuItem_View_Zoom_Medium.Checked = true;
+            iPG1_HeapView_Viewer.Zoom = HeapCtrlLib.Types.THeapCtrlZoom.EHeapCtrlZoomMedium;
+        }
+
+        private void iMenuItem_View_Zoom_Large_Click( object sender, EventArgs e )
+        {
+            ClearAllMenuViewZoomCheckboxes();
+            iMenuItem_View_Zoom_Large.Checked = true;
+            iPG1_HeapView_Viewer.Zoom = HeapCtrlLib.Types.THeapCtrlZoom.EHeapCtrlZoomMaximum;
+        }
+
+        private void iMenuItem_Help_About_Click(object sender, System.EventArgs e)
+		{
+			HeapViewerAboutDialog aboutDialog = new HeapViewerAboutDialog();
+			aboutDialog.ShowDialog();
+		}
+		#endregion
+
+        #region Popup event handlers
+        private void iPG1_HeapView_ContextMenu_Opening( object sender, CancelEventArgs e )
+        {
+            CellRightClickMetaData metaData = (CellRightClickMetaData) iPG1_HeapView_ContextMenu.Tag;
+            //
+            if ( metaData.Cell.Symbol != null )
+            {
+                // Remove old XRef entries and ensure we keep the settings
+                iPopupMenu_XRef.DropDownItems.Clear();
+                iPopupMenu_XRef.DropDownItems.Add( iPopupMenu_XRef_Settings );
+
+                // Add new xref items
+                XRefEngine engine = new XRefEngine();
+                engine.ParseIdentifiers( metaData.Cell.Symbol.NameWithoutVTablePrefix );
+
+                // Do we have some items to display?
+                foreach ( XRefIdentifer identifier in engine.Identifiers )
+                {
+                    ToolStripMenuItem dynamicXRefItem = new ToolStripMenuItem( identifier.Identifier );
+                    dynamicXRefItem.Name = "XREF_DYNAMIC_ITEM_" + identifier.Identifier;
+                    dynamicXRefItem.Click += new EventHandler( iPopupMenu_XRef_DynamicItem_Click );
+                    dynamicXRefItem.Tag = identifier;
+                    iPopupMenu_XRef.DropDownItems.Add( dynamicXRefItem );
+                }
+            }
+
+            // Remove goto sub-panes - we'll re-add them if they contain content
+            iPopupMenu_GoTo.DropDownItems.Clear();
+
+            // Add embedded references goto items.
+            iPopupMenu_GoTo_EmbeddedReferences.DropDownItems.Clear();
+            int rawItemCount = Math.Min( 50, metaData.Cell.RawItems.Count );
+            for( int i=0; i<rawItemCount; i++ )
+            {
+                RawItem item = metaData.Cell[ i ];
+                if ( item.Tag != null && item.Tag is RelationshipInfo )
+                {
+                    RelationshipInfo relInfo = (RelationshipInfo) item.Tag;
+                    //
+                    ToolStripMenuItem dynamicItem = new ToolStripMenuItem( relInfo.ToString() );
+                    dynamicItem.Name = "GOTO_DYNAMIC_ITEM_" + relInfo.ToCell.Address.ToString("x8");
+                    dynamicItem.Click += new EventHandler( iPopupMenu_GoTo_DynamicItem_Click );
+                    dynamicItem.Tag = relInfo.ToCell;
+
+                    // Make the item bold, if it corresponds to the right clicked raw item
+                    if ( relInfo.FromCellRawItem.Address == metaData.RawItem.Address )
+                    {
+                        dynamicItem.Font = new Font( dynamicItem.Font, FontStyle.Bold );
+                    }
+
+                    // Add it
+                    iPopupMenu_GoTo_EmbeddedReferences.DropDownItems.Add( dynamicItem );
+                }
+            }
+
+            // Add referenced by goto items
+            iPopupMenu_GoTo_IncomingReferences.DropDownItems.Clear();
+            int refCount = Math.Min( 50, metaData.RelationshipManager.ReferencedBy.Count );
+            for( int i=0; i<refCount; i++ )
+            {
+                HeapCell incomingCellRef = metaData.RelationshipManager.ReferencedBy[ i ];
+                //
+                ToolStripMenuItem dynamicItem = new ToolStripMenuItem( incomingCellRef.ToStringExtended() );
+                dynamicItem.Name = "GOTO_DYNAMIC_ITEM_" + incomingCellRef.Address.ToString( "x8" );
+                dynamicItem.Click += new EventHandler( iPopupMenu_GoTo_DynamicItem_Click );
+                dynamicItem.Tag = incomingCellRef;
+                iPopupMenu_GoTo_IncomingReferences.DropDownItems.Add( dynamicItem );
+            }
+
+            // Re-add the embedded/incoming reference items if there is some valid content
+            if ( iPopupMenu_GoTo_EmbeddedReferences.DropDownItems.Count > 0 )
+            {
+                iPopupMenu_GoTo.DropDownItems.Add( iPopupMenu_GoTo_EmbeddedReferences );
+            }
+            if ( iPopupMenu_GoTo_IncomingReferences.DropDownItems.Count > 0 )
+            {
+                iPopupMenu_GoTo.DropDownItems.Add( iPopupMenu_GoTo_IncomingReferences );
+            }
+
+            // Set the subform item checkbox state
+            iPopupMenu_Show_CellContentsViewer.Checked = ( iForm_CellContents != null );
+            iPopupMenu_Show_CellRelationshipInspector.Checked = ( iForm_RelationshipInspector != null );
+
+            // Do not show incoming relationship if there isn't one
+            iPopupMenu_Relationships_Incoming.DropDownItems.Clear();
+            iPopupMenu_Relationships_Incoming_Breadcrumbs.DropDownItems.Clear();
+            if ( metaData.RelationshipManager.EmbeddedReferencesTo.Count > 0 )
+            {
+                iPopupMenu_Relationships_Incoming.DropDownItems.Add( iPopupMenu_Relationships_Incoming_View );
+                iPopupMenu_Relationships_Incoming.DropDownItems.Add( iPopupMenu_Relationships_Incoming_Breadcrumbs );
+                iPopupMenu_Relationships_Incoming_Breadcrumbs.DropDownItems.Add( iPopupMenu_Relationships_Incoming_Breadcrumbs_Show );
+                iPopupMenu_Relationships_Incoming_Breadcrumbs_Show.Checked = iPG1_HeapView_Viewer.BreadcrumbCellsIncoming.Contains( metaData.Cell );
+            }
+            if ( iPG1_HeapView_Viewer.BreadcrumbCellsIncoming.Count > 0 )
+            {
+                if ( !iPopupMenu_Relationships_Incoming.DropDownItems.Contains( iPopupMenu_Relationships_Incoming_Breadcrumbs ) )
+                {
+                    iPopupMenu_Relationships_Incoming.DropDownItems.Add( iPopupMenu_Relationships_Incoming_Breadcrumbs );
+                }
+                if ( !iPopupMenu_Relationships_Incoming_Breadcrumbs.DropDownItems.Contains( iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll ) )
+                {
+                    iPopupMenu_Relationships_Incoming_Breadcrumbs.DropDownItems.Add( iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll );
+                }
+            }
+            if ( iPopupMenu_Relationships_Incoming.DropDownItems.Count == 0 )
+            {
+                iPopupMenu_Relationships.DropDownItems.Remove( iPopupMenu_Relationships_Incoming );
+            }
+            else if ( !iPopupMenu_Relationships.DropDownItems.Contains( iPopupMenu_Relationships_Incoming ) )
+            {
+                iPopupMenu_Relationships.DropDownItems.Insert( 0, iPopupMenu_Relationships_Incoming );
+            }
+
+            // Do not show outgoing relationship if there isn't one
+            iPopupMenu_Relationships_Outgoing.DropDownItems.Clear();
+            iPopupMenu_Relationships_Outgoing_Breadcrumbs.DropDownItems.Clear();
+            if ( metaData.RelationshipManager.EmbeddedReferencesTo.Count > 0 )
+            {
+                iPopupMenu_Relationships_Outgoing.DropDownItems.Add( iPopupMenu_Relationships_Outgoing_View );
+                iPopupMenu_Relationships_Outgoing.DropDownItems.Add( iPopupMenu_Relationships_Outgoing_Breadcrumbs );
+                iPopupMenu_Relationships_Outgoing_Breadcrumbs.DropDownItems.Add( iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show );
+                iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show.Checked = iPG1_HeapView_Viewer.BreadcrumbCellsOutgoing.Contains( metaData.Cell );
+            }
+            if ( iPG1_HeapView_Viewer.BreadcrumbCellsOutgoing.Count > 0 )
+            {
+                if ( !iPopupMenu_Relationships_Outgoing.DropDownItems.Contains( iPopupMenu_Relationships_Outgoing_Breadcrumbs ) )
+                {
+                    iPopupMenu_Relationships_Outgoing.DropDownItems.Add( iPopupMenu_Relationships_Outgoing_Breadcrumbs );
+                }
+                if ( !iPopupMenu_Relationships_Outgoing_Breadcrumbs.DropDownItems.Contains( iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll ) )
+                {
+                    iPopupMenu_Relationships_Outgoing_Breadcrumbs.DropDownItems.Add( iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll );
+                }
+            }
+            if ( iPopupMenu_Relationships_Outgoing.DropDownItems.Count == 0 )
+            {
+                iPopupMenu_Relationships.DropDownItems.Remove( iPopupMenu_Relationships_Outgoing );
+            }
+            else if ( !iPopupMenu_Relationships.DropDownItems.Contains( iPopupMenu_Relationships_Outgoing ) )
+            {
+                iPopupMenu_Relationships.DropDownItems.Insert( 0, iPopupMenu_Relationships_Outgoing );
+            }
+
+            // Add/remove relationship item if not needed
+            if ( iPopupMenu_Relationships.DropDownItems.Count == 0 )
+            {
+                iPG1_HeapView_ContextMenu.Items.Remove( iPopupMenu_Relationships );
+            }
+            else if ( !iPG1_HeapView_ContextMenu.Items.Contains( iPopupMenu_Relationships ) )
+            {
+                iPG1_HeapView_ContextMenu.Items.Insert( 0, iPopupMenu_Relationships );
+            }
+        }
+
+        private void iPopupMenu_Show_CellRelationshipInspector_Click( object sender, EventArgs e )
+        {
+            iMenuItem_View_Show_RelationshipInspector_Click( sender, e );
+        }
+
+        private void iPopupMenu_Show_CellContentsViewer_Click( object sender, EventArgs e )
+        {
+            iMenuItem_View_Show_CellContentsViewer_Click( sender, e );
+        }
+
+        private void iPopupMenu_XRef_Settings_Click( object sender, EventArgs e )
+        {
+            using ( XRefSettings settings = new XRefSettings() )
+            {
+                SymbianUtilsUi.XRef.XRefSettingsDialog dialog = new SymbianUtilsUi.XRef.XRefSettingsDialog( settings );
+                dialog.ShowDialog();
+            }
+        }
+
+        private void iPopupMenu_XRef_DynamicItem_Click( object aSender, EventArgs aArgs )
+        {
+            if ( aSender is ToolStripMenuItem )
+            {
+                ToolStripMenuItem item = (ToolStripMenuItem) aSender;
+                //
+                using ( XRefSettings settings = new XRefSettings() )
+                {
+                    XRefIdentifer identifier = (XRefIdentifer) item.Tag;
+                    XRefLauncher launcher = new XRefLauncher();
+                    launcher.Launch( identifier, settings );
+                }
+            }
+        }
+
+        private void iPopupMenu_GoTo_DynamicItem_Click( object aSender, EventArgs aArgs )
+        {
+            if ( aSender is ToolStripMenuItem )
+            {
+                ToolStripMenuItem item = (ToolStripMenuItem) aSender;
+                HeapCell cell = (HeapCell) item.Tag;
+                //
+                iPG1_HeapView_Viewer.FocusedCell = cell;
+            }
+        }
+
+        private void iPopupMenu_Relationships_Outgoing_View_Click( object sender, EventArgs e )
+        {
+            CellRightClickMetaData metaData = (CellRightClickMetaData) iPG1_HeapView_ContextMenu.Tag;
+
+            // First show everything
+            iPG6_RelationshipControl.SetFilter( TFilterType.EFilterShowAll );
+
+            // Make sure we're in the right sub-view mode
+            iPG6_RelationshipControl.ListMode = HeapCellRelationshipControl.TListMode.EListModeEmbeddedReferences;
+
+            // Then select the right item
+            iPG6_RelationshipControl.SelectedCell = metaData.Cell;
+
+            // Show the right tab
+            iTabs.SelectedTab = iPG6_Relationships;
+            iPG6_RelationshipControl.Focus();
+            iPG6_RelationshipControl.Select();
+        }
+
+        private void iPopupMenu_Relationships_Outgoing_Breadcrumbs_Show_Click( object sender, EventArgs e )
+        {
+            CellRightClickMetaData metaData = (CellRightClickMetaData) iPG1_HeapView_ContextMenu.Tag;
+            //
+            if ( iPG1_HeapView_Viewer.BreadcrumbCellsOutgoing.Contains( metaData.Cell ) )
+            {
+                iPG1_HeapView_Viewer.BreadcrumbCellsOutgoing.Remove( metaData.Cell );
+            }
+            else
+            {
+                iPG1_HeapView_Viewer.BreadcrumbCellsOutgoing.Add( metaData.Cell );
+            }
+            //
+            iPG1_HeapView_Viewer.BreadcrumbsChanged();
+        }
+
+        private void iPopupMenu_Relationships_Outgoing_Breadcrumbs_HideAll_Click( object sender, EventArgs e )
+        {
+            iPG1_HeapView_Viewer.BreadcrumbCellsOutgoing.Clear();
+            iPG1_HeapView_Viewer.BreadcrumbsChanged();
+        }
+
+        private void iPopupMenu_Relationships_Incoming_View_Click( object sender, EventArgs e )
+        {
+            CellRightClickMetaData metaData = (CellRightClickMetaData) iPG1_HeapView_ContextMenu.Tag;
+
+            // First show everything
+            iPG6_RelationshipControl.SetFilter( TFilterType.EFilterShowAll );
+
+            // Make sure we're in the right sub-view mode
+            iPG6_RelationshipControl.ListMode = HeapCellRelationshipControl.TListMode.EListModeReferencedBy;
+
+            // Then select the right item
+            iPG6_RelationshipControl.SelectedCell = metaData.Cell;
+
+            // Show the right tab
+            iTabs.SelectedTab = iPG6_Relationships;
+            iPG6_RelationshipControl.Focus();
+            iPG6_RelationshipControl.Select();
+        }
+
+        private void iPopupMenu_Relationships_Incoming_Breadcrumbs_Show_Click( object sender, EventArgs e )
+        {
+            CellRightClickMetaData metaData = (CellRightClickMetaData) iPG1_HeapView_ContextMenu.Tag;
+            //
+            if ( iPG1_HeapView_Viewer.BreadcrumbCellsIncoming.Contains( metaData.Cell ) )
+            {
+                iPG1_HeapView_Viewer.BreadcrumbCellsIncoming.Remove( metaData.Cell );
+            }
+            else
+            {
+                iPG1_HeapView_Viewer.BreadcrumbCellsIncoming.Add( metaData.Cell );
+            }
+            //
+            iPG1_HeapView_Viewer.BreadcrumbsChanged();
+        }
+
+        private void iPopupMenu_Relationships_Incoming_Breadcrumbs_HideAll_Click( object sender, EventArgs e )
+        {
+            iPG1_HeapView_Viewer.BreadcrumbCellsIncoming.Clear();
+            iPG1_HeapView_Viewer.BreadcrumbsChanged();
+        }
+        #endregion
+
+        #region Toolbox related event handlers
+        private void ShowFormCellRelationshipInspector()
+		{
+            System.Diagnostics.Debug.Assert( iForm_RelationshipInspector == null );
+			//
+            iForm_RelationshipInspector = new HeapCellRelationshipInspectorForm( this, iSettings );
+            iForm_RelationshipInspector.Closing += new CancelEventHandler( iForm_RelationshipInspector_Closing );
+            iForm_RelationshipInspector.Show();
+		}
+
+		private void ShowFormCellViewer()
+		{
+            System.Diagnostics.Debug.Assert( iForm_CellContents == null );
+			//
+            iForm_CellContents = new HeapCellContentsForm( this, iSettings );
+            iForm_CellContents.Closing += new CancelEventHandler( iForm_CellContents_Closing );
+            iForm_CellContents.Show();
+		}
+
+		private void iTimer_CreateToolBoxItems_Tick(object sender, System.EventArgs e)
+		{
+			iTimer_CreateToolBoxItems.Dispose();
+			iTimer_CreateToolBoxItems = null;
+			
+			// Work out which toolboxes should be visible. Set them to be NOT (setting)
+			// so that when the event handlers are called (just below), the visibility of the
+			// checkbox is toggled correctly.
+            iMenuItem_View_Show_RelationshipInspector.Checked = iSettings.LoadBool( "HeapViewerCellViewerForm", "iMenuItem_View_Show_RelationshipInspector" );
+            iMenuItem_View_Show_CellContentsViewer.Checked = iSettings.LoadBool( "HeapViewerCellViewerForm", "iMenuItem_View_Show_CellContentsViewer" );
+		}
+		#endregion
+
+        #region Keyboard & pointer
+        private void HeapViewerForm_KeyDown( object sender, KeyEventArgs e )
+        {
+            if ( e.Control && e.KeyCode == Keys.G )
+            {
+                iPG1_TB_Search_ByAddress.Focus();
+                iPG1_TB_Search_ByAddress.Select();
+                iPG1_TB_Search_ByAddress.SelectAll();
+            }
+        }
+
+        private void iPG1_HeapView_Viewer_KeyDown( object sender, KeyEventArgs e )
+        {
+            HeapViewerForm_KeyDown( sender, e );
+        }
+        #endregion
+
+        #endregion
+
+        #region Sub forms
+
+        #region Navigation form related
+        private void iForm_RelationshipInspector_Closing( object sender, CancelEventArgs e )
+		{
+            iForm_RelationshipInspector = null;
+			iMenuItem_View_Show_RelationshipInspector.Checked = false;
+		}
+		#endregion
+
+		#region Cell viewer form related
+        private void iForm_CellContents_Closing( object sender, CancelEventArgs e )
+		{
+			iForm_CellContents = null;
+			iMenuItem_View_Show_CellContentsViewer.Checked = false;
+		}
+		#endregion
+        
+        #endregion
+
+        #region Internal methods
+        private void CheckSourceForErrors( DataSource aSource )
+        {
+            string description = string.Empty;
+            //
+            bool errorsDetected = aSource.ErrorsDetected( out description );
+            if ( errorsDetected )
+            {
+                StringBuilder msg = new StringBuilder( description );
+                //
+                msg.Append( System.Environment.NewLine );
+                msg.Append( "You are recommended to save the heap data to zip and contact" );
+                msg.Append( "your support provider." );
+                //
+                MessageBox.Show( msg.ToString(), "Errors Detected", MessageBoxButtons.OK );
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly XmlSettings iSettings;
+		private readonly HeapReconstructor iReconstructor;
+        private HeapCellContentsForm iForm_CellContents;
+		private HeapCellRelationshipInspectorForm iForm_RelationshipInspector;
+		#endregion
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Forms/HeapViewerForm.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer_CreateToolBoxItems.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="iMainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>207, 17</value>
+  </metadata>
+  <metadata name="iToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 45</value>
+  </metadata>
+  <data name="iPG1_RB_HeapView_ByCellType.ToolTip" xml:space="preserve">
+    <value>Changes the heap view to show cells coloured by their type.
+
+There are essentially four categories:
+
+1) Free cells are blue.
+2) Allocated cells, which have known type information are orange.
+3) Allocated cells that are of unknown type are red.
+4) Allocated cells that are descriptors are yellow.
+
+For all cells, white represents the cell meta-data (or overhead).
+The amount of overhead depends on the cell type and also the
+build of the relevant heap library in question (UDEB vs UREL 
+EUSER.DLL or EKERN.EXE).
+
+As with all views, each 'box' represents 4 bytes of heap memory.</value>
+  </data>
+  <data name="iPG1_RB_HeapView_ByObjectType.ToolTip" xml:space="preserve">
+    <value>Colours the cells based upon their type information.
+
+Objects that contain vTables can be cross referenced against
+the symbolic information provided during the wizard-phase.
+
+Each object type is presented in a different colour. Use the
+"Set Filters" button on the right of the screen to alter the
+presentation of the colours.
+
+Descriptors and unknown cells are not emphasised.</value>
+  </data>
+  <data name="iPG1_RB_HeapView_ByParentBinary.ToolTip" xml:space="preserve">
+    <value>Colours the cells based upon the binary within which the code 
+for the object originates.
+
+Objects that contain vTables can be cross referenced against
+the symbolic information provided during the wizard-phase.
+
+Each binary is presented in a different colour. Use the
+"Set Filters" button on the right of the screen to alter the
+presentation of the colours.
+
+Descriptors and unknown cells are not emphasised.</value>
+  </data>
+  <data name="iPG1_RB_HeapView_ByEmbeddedReferences.ToolTip" xml:space="preserve">
+    <value>A view that emphasises cells based upon how many outgoing references
+any given cell contains. 
+
+Each cell is made up of a number of 4-byte DWORDs. Each DWORD, or 'box'
+in the view, is inspected to identify if the cell references any other cells
+within the heap data.
+
+Cells with more references are coloured red, and those with little or none are
+coloured blue.
+
+The number in the first 'box' of each cell refers to the number of outgoing
+references the cell makes towards other cells in the heap data.</value>
+  </data>
+  <data name="iPG1_RB_HeapView_ByIsolation.ToolTip" xml:space="preserve">
+    <value>A view that shows emphasises the number of incoming references
+to each cell.
+
+Colder cells, shown in dark blue, have little incoming references from other
+cells within the heap.
+
+Warmer cells, in red/pink have more incoming references from other cells
+within the heap.
+
+The number that appears in the first DWORD of each cell refers to the
+number of overall incoming references (by other cells) to the cell in question.</value>
+  </data>
+  <data name="iPG1_RB_HeapView_ByCellAge.ToolTip" xml:space="preserve">
+    <value>This view emhpasises how old a given cell is within the heap data.
+
+The older the cell, the colder it appears (dark blue).
+
+The warmer the cell, the more recently it was allocated within the heap
+(light/bright blue).
+
+The oldest cells typically appear at the start of the heap, with cells generally
+becoming younger as they are allocated towards the end of the heap.
+
+This view can be useful in determining if your heap is heavily fragmented or
+whether the allocation strategy used by the code that controls this heap is
+causing an artificially inflated high water mark due to poor lifetime management
+of heap cells.
+
+This view is only available in debug (UDEB) builds of EUSER.DLL or EKERN.EXE</value>
+  </data>
+  <metadata name="iTab2_ColModel_Stats.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>312, 17</value>
+  </metadata>
+  <metadata name="iTab2_TabModel_Stats.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>473, 17</value>
+  </metadata>
+  <metadata name="iPG5_TableModel_CellDistributionFree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>661, 11</value>
+  </metadata>
+  <metadata name="iPG5_TableModel_CellDistributionAllocated.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>942, 8</value>
+  </metadata>
+  <metadata name="iPG1_HeapView_ContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>1206, 8</value>
+  </metadata>
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>94</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/HeapUiLib.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,269 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <ProjectType>Local</ProjectType>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{C53FA050-1FA1-4567-A83B-DADA64DA1464}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ApplicationIcon>
+    </ApplicationIcon>
+    <AssemblyKeyContainerName>
+    </AssemblyKeyContainerName>
+    <AssemblyName>HeapUiLib</AssemblyName>
+    <AssemblyOriginatorKeyFile>
+    </AssemblyOriginatorKeyFile>
+    <DefaultClientScript>JScript</DefaultClientScript>
+    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+    <DefaultTargetSchema>IE50</DefaultTargetSchema>
+    <DelaySign>false</DelaySign>
+    <OutputType>Library</OutputType>
+    <RootNamespace>HeapUiLib</RootNamespace>
+    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+    <StartupObject>
+    </StartupObject>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>true</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>false</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>false</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>none</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System">
+      <Name>System</Name>
+    </Reference>
+    <Reference Include="System.Data">
+      <Name>System.Data</Name>
+    </Reference>
+    <Reference Include="System.Drawing">
+      <Name>System.Drawing</Name>
+    </Reference>
+    <Reference Include="System.Windows.Forms">
+      <Name>System.Windows.Forms</Name>
+    </Reference>
+    <Reference Include="System.Xml">
+      <Name>System.XML</Name>
+    </Reference>
+    <Reference Include="XPTable, Version=1.1.13.21130, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\PerfToolsSharedLibraries\3rd Party\XPTable\bin\Debug\XPTable.dll</HintPath>
+    </Reference>
+    <Reference Include="ZedGraph, Version=5.1.5.28844, Culture=neutral, PublicKeyToken=02a83cbd123fcd60, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\PerfToolsSharedLibraries\3rd Party\ZedGraph\zedgraph_dll_v5.1.5\ZedGraph.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Controls\FilterTypes.cs" />
+    <Compile Include="Controls\HeapCellInfoControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapCellInfoControl.Designer.cs">
+      <DependentUpon>HeapCellInfoControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Controls\HeapCellListingControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapCellListingFilter.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapCellListingFilter.Designer.cs">
+      <DependentUpon>HeapCellListingFilter.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Controls\HeapCellRelationshipControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapCellRelationshipControl.Designer.cs">
+      <DependentUpon>HeapCellRelationshipControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Controls\HeapCellSizeDistributionControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapCellSizeDistributionControl.Designer.cs">
+      <DependentUpon>HeapCellSizeDistributionControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Controls\HeapCellStatsControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapCellStatsControl.Designer.cs">
+      <DependentUpon>HeapCellStatsControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Controls\HeapCellViewerControl.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Controls\HeapCellViewerControl.Designer.cs">
+      <DependentUpon>HeapCellViewerControl.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Dialogs\HeapExportToHTMLProgressDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Dialogs\HeapReconstructorDataSourceAnalyserDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Dialogs\HeapReconstructorProgressDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Dialogs\HeapViewerAboutDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\HeapViewerForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Misc\CellRightClickMetaData.cs" />
+    <Compile Include="Misc\TrackingInfoCaptioner.cs" />
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="SubForms\HeapCellContentsForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="SubForms\HeapCellRelationshipInspectorForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <EmbeddedResource Include="Controls\HeapCellInfoControl.resx">
+      <DependentUpon>HeapCellInfoControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Controls\HeapCellListingControl.resx">
+      <DependentUpon>HeapCellListingControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Controls\HeapCellListingFilter.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>HeapCellListingFilter.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Controls\HeapCellRelationshipControl.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>HeapCellRelationshipControl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Controls\HeapCellSizeDistributionControl.resx">
+      <DependentUpon>HeapCellSizeDistributionControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Controls\HeapCellStatsControl.resx">
+      <DependentUpon>HeapCellStatsControl.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Controls\HeapCellViewerControl.resx">
+      <SubType>Designer</SubType>
+      <DependentUpon>HeapCellViewerControl.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Dialogs\HeapExportToHTMLProgressDialog.resx">
+      <DependentUpon>HeapExportToHTMLProgressDialog.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Dialogs\HeapReconstructorDataSourceAnalyserDialog.resx">
+      <DependentUpon>HeapReconstructorDataSourceAnalyserDialog.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Dialogs\HeapReconstructorProgressDialog.resx">
+      <DependentUpon>HeapReconstructorProgressDialog.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Dialogs\HeapViewerAboutDialog.resx">
+      <DependentUpon>HeapViewerAboutDialog.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Forms\HeapViewerForm.resx">
+      <DependentUpon>HeapViewerForm.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <SubType>Designer</SubType>
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <EmbeddedResource Include="SubForms\HeapCellContentsForm.resx">
+      <DependentUpon>HeapCellContentsForm.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="SubForms\HeapCellRelationshipInspectorForm.resx">
+      <DependentUpon>HeapCellRelationshipInspectorForm.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianStructuresLib\SymbianStructuresLib.csproj">
+      <Project>{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}</Project>
+      <Name>SymbianStructuresLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianZipLib\SymbianZipLib.csproj">
+      <Project>{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}</Project>
+      <Name>SymbianZipLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\UI\SymbianUtilsUi\SymbianUtilsUi.csproj">
+      <Project>{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}</Project>
+      <Name>SymbianUtilsUi</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Engine\HeapLib\HeapLib.csproj">
+      <Project>{D638AB12-FC64-4523-9B99-09F20BC2A791}</Project>
+      <Name>HeapLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeapCtrlLib\HeapCtrlLib.csproj">
+      <Project>{4883C5F9-B83E-4262-8389-879AC9E1DF1B}</Project>
+      <Name>HeapCtrlLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>
+    </PreBuildEvent>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/HeapUiLib.csproj.user	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,58 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <LastOpenVersion>7.10.6030</LastOpenVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ReferencePath>
+    </ReferencePath>
+    <CopyProjectDestinationFolder>
+    </CopyProjectDestinationFolder>
+    <CopyProjectUncPath>
+    </CopyProjectUncPath>
+    <CopyProjectOption>0</CopyProjectOption>
+    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectTrust>0</ProjectTrust>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Misc/CellRightClickMetaData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.IO;
+using System.Text;
+using SymbianUtils;
+using SymbianUtils.XRef;
+using SymbianUtils.RawItems;
+using SymbianUtils.FileSystem.FilePair;
+using SymbianZipLib.GUI;
+using ZedGraph;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapLib.Reconstructor;
+using HeapLib.Statistics.Tracking.Base;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapUiLib.Dialogs;
+using HeapUiLib.SubForms;
+using HeapUiLib.Controls;
+using HeapUiLib.Misc;
+using HeapCtrlLib;
+
+namespace HeapUiLib.Misc
+{
+    internal class CellRightClickMetaData
+    {
+        #region Constructors & destructor
+        public CellRightClickMetaData( HeapCell aCell, RawItem aRawItem )
+        {
+            iCell = aCell;
+            iRawItem = aRawItem;
+        }
+        #endregion
+
+        #region API
+
+        #endregion
+
+        #region Properties
+        public HeapCell Cell
+        {
+            get { return iCell; }
+        }
+
+        public RawItem RawItem
+        {
+            get { return iRawItem; }
+        }
+
+        public RelationshipManager RelationshipManager
+        {
+            get { return Cell.RelationshipManager; }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapCell iCell;
+        private readonly RawItem iRawItem;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Misc/TrackingInfoCaptioner.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using SymbianStructuresLib.Debug.Symbols;
+using HeapLib.Statistics.Tracking.Base;
+using HeapLib.Statistics.Tracking.BySymbol;
+using HeapUiLib.Controls;
+
+namespace HeapUiLib.Misc
+{
+    internal class TrackingInfoCaptioner
+    {
+        #region Constructors & destructor
+        public TrackingInfoCaptioner( TrackingInfo aInfo )
+        {
+            iTrackingInfo = aInfo;
+        }
+
+        public TrackingInfoCaptioner( string aText, TFilterType aFilterType )
+        {
+            iText = aText;
+            iFilterType = aFilterType;
+        }
+        #endregion
+
+        #region Properties
+        public TrackingInfo TrackingInfo
+        {
+            get { return iTrackingInfo; }
+        }
+
+        public TFilterType FilterType
+        {
+            get { return iFilterType; }
+        }
+
+        public Symbol Symbol
+        {
+            get
+            {
+                Symbol ret = null;
+                //
+                if ( iTrackingInfo != null && iTrackingInfo.Symbol != null )
+                {
+                    ret = iTrackingInfo.Symbol;
+                }
+                //
+                return ret;
+            }
+        }
+
+        public bool IsSymbolBasedAllocationEntry
+        {
+            get { return iFilterType == TFilterType.EFilterShowCellsAllocatedByType; }
+        }
+        #endregion
+
+        #region From System.Object
+        public override string ToString()
+        {
+            if ( iText != null )
+            {
+                return iText;
+            }
+
+            System.Diagnostics.Debug.Assert( iTrackingInfo != null );
+
+            string captionFormat = "[A{0}] [{1:d5}] [{2:d8}] {3}";
+            string prefix = "U";
+            string postfix = "Unknown Cell Types";
+            //
+            if ( !iTrackingInfo.IsUnknownSymbolMatchItem )
+            {
+                prefix = "S";
+                postfix = iTrackingInfo.Symbol.NameWithoutVTablePrefix;
+            }
+            //
+            string ret = String.Format( captionFormat, prefix, iTrackingInfo.Count, iTrackingInfo.AssociatedMemory, postfix );
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        private readonly TrackingInfo iTrackingInfo;
+        private string iText = null;
+        private TFilterType iFilterType = TFilterType.EFilterShowCellsAllocatedByType;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Properties/Resources.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:2.0.50727.1433
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeapUiLib.Properties {
+    using System;
+    
+    
+    // <summary>
+    //   A strongly-typed resource class, for looking up localized strings, etc.
+    // </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        // <summary>
+        //   Returns the cached ResourceManager instance used by this class.
+        // </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeapUiLib.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        // <summary>
+        //   Overrides the current thread's CurrentUICulture property for all
+        //   resource lookups using this strongly typed resource class.
+        // </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/Properties/Resources.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellContentsForm.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,243 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+using System.Windows.Forms;
+using SymbianUtils.Settings;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapUiLib.Forms;
+
+namespace HeapUiLib.SubForms
+{
+	public class HeapCellContentsForm : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer Code
+        private HeapUiLib.Controls.HeapCellViewerControl iContents;
+		#endregion
+
+		#region Constructors & destructors
+        // <summary>
+        // Construct a new cell contents form, but persist no settings associated with this
+        // popup window, nor observe the main form for positional changes
+        // </summary>
+        // <param name="aMainForm"></param>
+        public HeapCellContentsForm( HeapViewerForm aMainForm, HeapCell aFixedCell )
+        {
+            iMainForm = aMainForm;
+            iMainForm.Closing += new CancelEventHandler( iMainForm_Closing );
+            //
+            iSettings = null;
+            //
+            InitializeComponent();
+            
+            // Show contents
+            Cell = aFixedCell;
+
+            // Title
+            Text += " - 0x" + aFixedCell.Address.ToString( "x8" ) + " " + aFixedCell.SymbolString;
+        }
+
+        // <summary>
+        // Create a cell contents form that follows the main form selection and also
+        // persists position of the form when it closes.
+        // </summary>
+        // <param name="aMainForm"></param>
+        // <param name="aSettings"></param>
+        public HeapCellContentsForm( HeapViewerForm aMainForm, XmlSettings aSettings )
+		{
+			iMainForm = aMainForm;
+			iMainForm.HeapCellSelectedObserver += new HeapUiLib.Forms.HeapViewerForm.HeapCellSelectedObserverHandler(iMainForm_HeapCellSelectedObserver);
+			iMainForm.Closing += new CancelEventHandler(iMainForm_Closing);
+            iTrackingMainForm = true;
+			//
+			iSettings = aSettings;
+			//
+			InitializeComponent();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+                if ( iMainForm != null  )
+                {
+                    if ( iTrackingMainForm )
+                    {
+                        iMainForm.HeapCellSelectedObserver -= new HeapUiLib.Forms.HeapViewerForm.HeapCellSelectedObserverHandler( iMainForm_HeapCellSelectedObserver );
+                    }
+                    //
+                    iMainForm.Closing -= new CancelEventHandler( iMainForm_Closing );
+                }
+
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		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 );
+
+		}
+		#endregion
+	
+		#region API
+		public HeapCell MainFormSelectedCell
+		{
+			get
+			{
+                HeapCell ret = Cell;
+                //
+                if ( iMainForm != null )
+                {
+                    ret = iMainForm.FocusedCell;
+                }
+                //
+                return ret;
+			}
+		}
+
+        public HeapCell Cell
+        {
+            get { return iContents.Cell; }
+            set
+            {
+                iContents.Cell = value;
+            }
+        }
+		#endregion
+
+		#region Form loading & closing event handlers
+		private void HeapViewerLinkedCellsForm_Load(object sender, System.EventArgs e)
+		{
+            if ( iSettings != null )
+            {
+                Point position = new Point();
+                position.X = iSettings.Load( "HeapViewerCellViewerForm", "WindowPositionX", 0 );
+                position.Y = iSettings.Load( "HeapViewerCellViewerForm", "WindowPositionY", 0 );
+                Location = position;
+            }
+
+            iMainForm_HeapCellSelectedObserver( MainFormSelectedCell );
+		}
+
+		private void HeapViewerLinkedCellsForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+		{
+            if ( iSettings != null )
+            {
+                iSettings.Save( "HeapViewerCellViewerForm", "WindowPositionX", Location.X );
+                iSettings.Save( "HeapViewerCellViewerForm", "WindowPositionY", Location.Y );
+            }
+		}
+		#endregion
+
+		#region Main Form event handlers
+		private void iMainForm_HeapCellSelectedObserver( HeapCell aCell )
+		{
+            iContents.Cell = aCell;
+        }
+
+		private void iMainForm_Closing(object sender, CancelEventArgs e)
+		{
+			// Close ourselves when our parent closes.
+			DialogResult = DialogResult.OK;
+			Close();
+		}
+		#endregion
+
+        #region Event handlers
+        private void iContents_CellLinkDoubleClicked( HeapCell aCell )
+        {
+            if ( iMainForm != null )
+            {
+                iMainForm.FocusedCell = aCell;
+            }
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapViewerForm iMainForm;
+        private readonly XmlSettings iSettings;
+        private bool iTrackingMainForm = false;
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellContentsForm.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellRelationshipInspectorForm.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,502 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Text;
+using System.Windows.Forms;
+using SymbianUtils.Settings;
+using HeapLib;
+using HeapLib.Cells;
+using HeapLib.Array;
+using HeapLib.Relationships;
+using HeapUiLib.Forms;
+
+namespace HeapUiLib.SubForms
+{
+	public class HeapCellRelationshipInspectorForm : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer Code
+        private System.Windows.Forms.Timer iTimer_RefreshRawItems;
+        private TableLayoutPanel iTL_Main;
+        private TreeView iTreeView;
+        private TableLayoutPanel iTL_Middle;
+        private ComboBox iCombo_SizingType;
+        private Button iButton_GoToSelectedCell;
+        private TextBox iTextBox_CombinedSize;
+		private System.ComponentModel.IContainer components;
+		#endregion
+
+		#region Constructors & destructors
+        public HeapCellRelationshipInspectorForm( HeapViewerForm aMainForm, XmlSettings aSettings )
+		{
+			iMainForm = aMainForm;
+			iMainForm.HeapCellSelectedObserver += new HeapUiLib.Forms.HeapViewerForm.HeapCellSelectedObserverHandler(iMainForm_HeapCellSelectedObserver);
+			iMainForm.Closing += new CancelEventHandler(iMainForm_Closing);
+			//
+			iCollection = aMainForm.CellCollection;
+			iSettings = aSettings;
+			//
+			InitializeComponent();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				iMainForm.HeapCellSelectedObserver -= new HeapUiLib.Forms.HeapViewerForm.HeapCellSelectedObserverHandler(iMainForm_HeapCellSelectedObserver);
+				iMainForm.Closing -= new CancelEventHandler(iMainForm_Closing);
+
+				if  ( components != null )
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            this.iTimer_RefreshRawItems = new System.Windows.Forms.Timer( this.components );
+            this.iTL_Main = new System.Windows.Forms.TableLayoutPanel();
+            this.iTreeView = new System.Windows.Forms.TreeView();
+            this.iTL_Middle = new System.Windows.Forms.TableLayoutPanel();
+            this.iButton_GoToSelectedCell = new System.Windows.Forms.Button();
+            this.iTextBox_CombinedSize = new System.Windows.Forms.TextBox();
+            this.iCombo_SizingType = new System.Windows.Forms.ComboBox();
+            this.iTL_Main.SuspendLayout();
+            this.iTL_Middle.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // iTL_Main
+            // 
+            this.iTL_Main.ColumnCount = 1;
+            this.iTL_Main.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iTL_Main.Controls.Add( this.iTreeView, 0, 0 );
+            this.iTL_Main.Controls.Add( this.iTL_Middle, 0, 1 );
+            this.iTL_Main.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTL_Main.Location = new System.Drawing.Point( 0, 0 );
+            this.iTL_Main.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iTL_Main.Name = "iTL_Main";
+            this.iTL_Main.RowCount = 2;
+            this.iTL_Main.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 50F ) );
+            this.iTL_Main.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Absolute, 30F ) );
+            this.iTL_Main.Size = new System.Drawing.Size( 355, 284 );
+            this.iTL_Main.TabIndex = 19;
+            // 
+            // iTreeView
+            // 
+            this.iTreeView.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTreeView.Font = new System.Drawing.Font( "Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( (byte) ( 0 ) ) );
+            this.iTreeView.Location = new System.Drawing.Point( 3, 3 );
+            this.iTreeView.Name = "iTreeView";
+            this.iTreeView.Size = new System.Drawing.Size( 349, 248 );
+            this.iTreeView.TabIndex = 1;
+            this.iTreeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler( this.iTreeView_BeforeExpand );
+            this.iTreeView.DoubleClick += new System.EventHandler( this.iTreeView_DoubleClick );
+            this.iTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler( this.iTreeView_AfterSelect );
+            // 
+            // iTL_Middle
+            // 
+            this.iTL_Middle.ColumnCount = 3;
+            this.iTL_Middle.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 65F ) );
+            this.iTL_Middle.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Percent, 35F ) );
+            this.iTL_Middle.ColumnStyles.Add( new System.Windows.Forms.ColumnStyle( System.Windows.Forms.SizeType.Absolute, 108F ) );
+            this.iTL_Middle.Controls.Add( this.iButton_GoToSelectedCell, 0, 0 );
+            this.iTL_Middle.Controls.Add( this.iTextBox_CombinedSize, 0, 0 );
+            this.iTL_Middle.Controls.Add( this.iCombo_SizingType, 0, 0 );
+            this.iTL_Middle.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTL_Middle.Location = new System.Drawing.Point( 0, 254 );
+            this.iTL_Middle.Margin = new System.Windows.Forms.Padding( 0 );
+            this.iTL_Middle.MaximumSize = new System.Drawing.Size( 0, 27 );
+            this.iTL_Middle.MinimumSize = new System.Drawing.Size( 0, 27 );
+            this.iTL_Middle.Name = "iTL_Middle";
+            this.iTL_Middle.RowCount = 1;
+            this.iTL_Middle.RowStyles.Add( new System.Windows.Forms.RowStyle( System.Windows.Forms.SizeType.Percent, 100F ) );
+            this.iTL_Middle.Size = new System.Drawing.Size( 355, 27 );
+            this.iTL_Middle.TabIndex = 2;
+            // 
+            // iButton_GoToSelectedCell
+            // 
+            this.iButton_GoToSelectedCell.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iButton_GoToSelectedCell.Location = new System.Drawing.Point( 249, 3 );
+            this.iButton_GoToSelectedCell.Name = "iButton_GoToSelectedCell";
+            this.iButton_GoToSelectedCell.Size = new System.Drawing.Size( 103, 21 );
+            this.iButton_GoToSelectedCell.TabIndex = 20;
+            this.iButton_GoToSelectedCell.Text = "Go to cell...";
+            this.iButton_GoToSelectedCell.Click += new System.EventHandler( this.iButton_GoToSelectedCell_Click );
+            // 
+            // iTextBox_CombinedSize
+            // 
+            this.iTextBox_CombinedSize.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iTextBox_CombinedSize.Enabled = false;
+            this.iTextBox_CombinedSize.Location = new System.Drawing.Point( 163, 3 );
+            this.iTextBox_CombinedSize.Name = "iTextBox_CombinedSize";
+            this.iTextBox_CombinedSize.Size = new System.Drawing.Size( 80, 21 );
+            this.iTextBox_CombinedSize.TabIndex = 19;
+            // 
+            // iCombo_SizingType
+            // 
+            this.iCombo_SizingType.DisplayMember = "Text";
+            this.iCombo_SizingType.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iCombo_SizingType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.iCombo_SizingType.Items.AddRange( new object[] {
+            "Payload size",
+            "Payload size (including children)",
+            "Payload size (just children)",
+            "Payload size (recursive)"} );
+            this.iCombo_SizingType.Location = new System.Drawing.Point( 3, 3 );
+            this.iCombo_SizingType.MaxDropDownItems = 4;
+            this.iCombo_SizingType.Name = "iCombo_SizingType";
+            this.iCombo_SizingType.Size = new System.Drawing.Size( 154, 21 );
+            this.iCombo_SizingType.TabIndex = 18;
+            this.iCombo_SizingType.ValueMember = "Text";
+            this.iCombo_SizingType.SelectedIndexChanged += new System.EventHandler( this.iCombo_SizingType_SelectedIndexChanged );
+            // 
+            // HeapCellRelationshipInspectorForm
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 14 );
+            this.ClientSize = new System.Drawing.Size( 355, 284 );
+            this.Controls.Add( this.iTL_Main );
+            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 = "HeapCellRelationshipInspectorForm";
+            this.Text = "Embedded Cell References";
+            this.TopMost = true;
+            this.Load += new System.EventHandler( this.HeapCellRelationshipInspectorForm_Load );
+            this.Closing += new System.ComponentModel.CancelEventHandler( this.HeapCellRelationshipInspectorForm_Closing );
+            this.iTL_Main.ResumeLayout( false );
+            this.iTL_Middle.ResumeLayout( false );
+            this.iTL_Middle.PerformLayout();
+            this.ResumeLayout( false );
+
+		}
+		#endregion
+	
+		#region API
+		public HeapCell MainFormSelectedCell
+		{
+			get
+			{
+				return iMainForm.FocusedCell;
+			}
+		}
+		#endregion
+
+		#region Form loading & closing event handlers
+        private void HeapCellRelationshipInspectorForm_Load( object sender, System.EventArgs e )
+		{
+			Point position = new Point();
+            position.X = iSettings.Load( "HeapCellRelationshipInspectorForm", "WindowPositionX", 0 );
+            position.Y = iSettings.Load( "HeapCellRelationshipInspectorForm", "WindowPositionY", 0 );
+			Location = position;
+			//
+			iCombo_SizingType.SelectedIndex = 0;
+            //
+            iMainForm_HeapCellSelectedObserver( MainFormSelectedCell );
+		}
+
+        private void HeapCellRelationshipInspectorForm_Closing( object sender, System.ComponentModel.CancelEventArgs e )
+		{
+            iSettings.Save( "HeapCellRelationshipInspectorForm", "WindowPositionX", Location.X );
+            iSettings.Save( "HeapCellRelationshipInspectorForm", "WindowPositionY", Location.Y );
+		}
+		#endregion
+
+		#region Main Form event handlers
+		private void iMainForm_HeapCellSelectedObserver( HeapCell aCell )
+		{
+            // The focused heap cell on the main form has changed. 
+			PopulateTree( aCell );
+			UpdateSizingTextBoxByType();
+
+			// Make sure the tree view selects the top (root) node
+			if	( iTreeView.Nodes.Count > 0 )
+			{
+				iTreeView.SelectedNode = iTreeView.Nodes[ 0 ];
+			}
+        }
+
+		private void iMainForm_Closing(object sender, CancelEventArgs e)
+		{
+			// Close ourselves when our parent closes.
+			DialogResult = DialogResult.OK;
+			Close();
+		}
+		#endregion
+
+		#region Tree event handlers
+		private void iTreeView_AfterSelect( object sender, System.Windows.Forms.TreeViewEventArgs e )
+		{
+			if	( e.Node.Tag != null && e.Node.Tag is HeapCell )
+			{
+				HeapCell cell = (HeapCell) e.Node.Tag;
+			
+				// Update the raw cell view
+                //ContentsViewerCell = cell;
+
+				// Update the combined sizing (guesstimate)
+				UpdateSizingTextBoxByType();
+			}
+		}
+
+        private void iTreeView_BeforeExpand( object sender, TreeViewCancelEventArgs e )
+        {
+            if ( e.Node.Nodes.Count == 1 && e.Node.FirstNode.Text == KPlaceHolderTreeNodeText )
+            {
+                // Its a place holder. Let's fix it with the real tree items.
+                HeapCell cell = (HeapCell) e.Node.Tag;
+
+                // Start update operation so that we don't redraw until the entries
+                // have been added.
+                iTreeView.BeginUpdate();
+
+                // Add real entries
+                PopulateBranch( cell, e.Node );
+
+                // Discard first child node which was our placeholder
+                e.Node.FirstNode.Remove();
+
+                // End process
+                iTreeView.EndUpdate();
+            }
+        }
+
+		private void iTreeView_DoubleClick( object sender, System.EventArgs e )
+		{
+		}
+		#endregion
+
+		#region Internal tree methods
+        private static TreeNode CreateChildNode( HeapCell aParent, HeapCell aCell, RelationshipInfo aRelationshipDescriptor /* optional */ )
+		{
+            StringBuilder caption = new StringBuilder();
+            caption.Append( "[" + aCell.Address.ToString( "x8" ) + "] " );
+            if ( aRelationshipDescriptor != null )
+            {
+                caption.Append( "[" + aRelationshipDescriptor.LinkAddressOffsetWithinFromCell.ToString( "d4" ) + "] " );
+            }
+            caption.Append( "[" + aCell.PayloadLength.ToString( "d6" ) + "] " );
+			//
+			System.Drawing.Color foreColour = Color.Black;
+            if ( aCell.Symbol != null )
+			{
+                caption.Append( aCell.Symbol.NameWithoutVTablePrefix );
+				foreColour = Color.Blue;
+			}
+			else
+			{
+				caption.Append( "No symbol" );
+				foreColour = Color.LightGray;
+			}
+			//
+			TreeNode node = new TreeNode( caption.ToString() );
+			node.ForeColor = foreColour;
+			return node;
+		}
+
+		private void PopulateTree( HeapCell aCell )
+		{
+			iTreeView.BeginUpdate();
+			iTreeView.Nodes.Clear();
+
+			// First add the main parent node
+            TreeNode topNode = CreateChildNode( null, aCell, null );
+			topNode.Tag = aCell;
+			topNode.Expand();
+			//
+			PopulateBranch( aCell, topNode );
+			//
+			iTreeView.Nodes.Add( topNode );
+			iTreeView.EndUpdate();
+		}
+		
+		private bool IsCyclic( HeapCell aCell, TreeNode aNode ) 
+		{
+			bool cyclic = false;
+			TreeNode currentNode = aNode;
+			//
+			while( currentNode.Parent != null )
+			{
+				if	( currentNode.Parent.Tag != null && currentNode.Parent.Tag is HeapCell )
+				{
+					HeapCell parentCell = (HeapCell) currentNode.Parent.Tag;
+					if	( parentCell.Address == aCell.Address )
+					{
+						cyclic = true;
+						break;
+					}
+				}
+				currentNode = currentNode.Parent;
+			}
+			//
+			return cyclic;
+		}
+
+		private void PopulateBranch( HeapCell aCell, TreeNode aParentNode )
+		{
+            RelationshipCollection linkedCells = aCell.RelationshipManager.EmbeddedReferencesTo;
+		    //
+            if ( linkedCells.Count == 0 && aParentNode.Parent == null )
+			{
+				TreeNode noChildrenNode = new TreeNode( "Has no linked items" );
+				noChildrenNode.Tag = null;
+				aParentNode.Nodes.Add( noChildrenNode );
+			}
+			else if ( linkedCells.Count > 0 )
+			{
+                foreach ( RelationshipInfo relationshipInfo in linkedCells ) 
+				{
+                    TreeNode childNode = CreateChildNode( aCell, relationshipInfo.ToCell, relationshipInfo );
+                    //
+					childNode.Tag = relationshipInfo.ToCell;
+					aParentNode.Nodes.Add( childNode );
+					//
+                    if ( IsCyclic( relationshipInfo.ToCell, childNode ) == false )
+					{
+                        if ( aParentNode.Level < KMaxRecursiveDepth )
+                        {
+                            int childRelationshipCount = relationshipInfo.ToCell.RelationshipManager.EmbeddedReferencesTo.Count;
+                            if ( childRelationshipCount > 0 )
+                            {
+                                // Make a place holder
+                                TreeNode placeholder = new TreeNode( KPlaceHolderTreeNodeText );
+                                childNode.Nodes.Add( placeholder );
+                            }
+                        }
+                        else
+                        {
+						    childNode.Text += " [Max. Depth Exceeded]";
+						    childNode.ForeColor = Color.Red;
+                        }
+					}
+					else
+					{
+						childNode.Text += " [C]";
+						childNode.ForeColor = Color.Red;
+					}
+				}
+			}
+		}
+		#endregion
+
+		#region Sizing (combo) event handler
+		private enum TSizingType
+		{
+			ESizingTypePayloadSize = 0,
+			ESizingTypePayloadSizeIncludingChildren,
+			ESizingTypePayloadSizeJustChildren,
+			ESizingTypePayloadSizeRecursive
+		}
+
+		private void UpdateSizingTextBoxByType()
+		{
+			int index = iCombo_SizingType.SelectedIndex;
+			TSizingType type = (TSizingType) index;
+			UpdateSizingTextBoxByType( type );
+		}
+
+		private void UpdateSizingTextBoxByType( TSizingType aType )
+		{
+			string size = string.Empty;
+			//
+			TreeNode node = iTreeView.SelectedNode;
+			if	( node != null && node.Tag != null && node.Tag is HeapCell )
+			{
+				HeapCell selectedCell = (HeapCell) node.Tag;
+				//
+				switch( aType )
+				{
+				case TSizingType.ESizingTypePayloadSize:
+					size = selectedCell.PayloadLength.ToString( "d12" );
+					break;
+				case TSizingType.ESizingTypePayloadSizeIncludingChildren:
+					size = selectedCell.PayloadLengthIncludingLinkedCells.ToString( "d12" );
+					break;
+				case TSizingType.ESizingTypePayloadSizeJustChildren:
+					size = ( selectedCell.PayloadLengthIncludingLinkedCells - selectedCell.PayloadLength ).ToString( "d12" );
+					break;
+				case TSizingType.ESizingTypePayloadSizeRecursive:
+					size = selectedCell.CombinedLinkedCellPayloadLengths.ToString( "d12" );
+					break;
+				default:
+					break;
+				}
+			}
+			//
+			iTextBox_CombinedSize.Text = size;
+		}
+
+		private void iCombo_SizingType_SelectedIndexChanged(object sender, System.EventArgs e)
+		{
+			UpdateSizingTextBoxByType();
+		}
+		#endregion
+
+		#region Button event handlers
+		private void iButton_GoToSelectedCell_Click(object sender, System.EventArgs e)
+		{
+			TreeNode node = iTreeView.SelectedNode;
+			if	( node != null && node.Tag != null && node.Tag is HeapCell )
+			{
+				HeapCell selectedCell = (HeapCell) node.Tag;
+				iMainForm.FocusedCell = selectedCell;
+			}
+		}
+		#endregion
+
+        #region Internal constants
+        private const int KMaxRecursiveDepth = 10;
+        private const string KPlaceHolderTreeNodeText = "#!/|PLACE HOLDER!!";
+        #endregion
+
+        #region Data members
+        private readonly HeapCellArray iCollection;
+		private readonly HeapViewerForm iMainForm;
+		private readonly XmlSettings iSettings;
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/HeapUiLib/SubForms/HeapCellRelationshipInspectorForm.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer_RefreshRawItems.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("MemAnalysisUILib")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Nokia")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]		
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Dialogs/MemAnalysisParsingProgressDialog.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using SymbianUtils;
+using SymbolLib;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.Parser.Base;
+using MemAnalysisLib.Parser.Implementations;
+
+namespace MemAnalysisUiLib.Dialogs
+{
+	public class MemAnalysisParsingProgressDialog : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer generated code
+        private IContainer components;
+        private Timer iTimer_OpStart;
+        private System.Windows.Forms.ProgressBar iProgressBar;
+		#endregion
+
+		#region Constructors & destructor
+		public static void ParseLog( MemAnalysisParserBase aParser  )
+		{
+            MemAnalysisParsingProgressDialog self = new MemAnalysisParsingProgressDialog( aParser );
+			self.ShowDialog();
+		}
+
+        internal MemAnalysisParsingProgressDialog( MemAnalysisParserBase aParser )
+		{
+			InitializeComponent();
+			//
+			iParser = aParser;
+			iParser.iObserver += new SymbianUtils.AsyncReaderBase.Observer( Parser_Observer );
+            //
+            iTimer_OpStart.Start();
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            this.iProgressBar = new System.Windows.Forms.ProgressBar();
+            this.iTimer_OpStart = new System.Windows.Forms.Timer( this.components );
+            this.SuspendLayout();
+            // 
+            // iProgressBar
+            // 
+            this.iProgressBar.Location = new System.Drawing.Point( 8, 8 );
+            this.iProgressBar.Name = "iProgressBar";
+            this.iProgressBar.Size = new System.Drawing.Size( 376, 24 );
+            this.iProgressBar.TabIndex = 0;
+            // 
+            // iTimer_OpStart
+            // 
+            this.iTimer_OpStart.Interval = 10;
+            this.iTimer_OpStart.Tick += new System.EventHandler( this.iTimer_OpStart_Tick );
+            // 
+            // MemAnalysisParsingProgressDialog
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.ClientSize = new System.Drawing.Size( 392, 39 );
+            this.ControlBox = false;
+            this.Controls.Add( this.iProgressBar );
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "MemAnalysisParsingProgressDialog";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = " Analysing Memory Trace Data...";
+            this.ResumeLayout( false );
+
+		}
+		#endregion
+
+        #region Event handlers
+        private void iTimer_OpStart_Tick( object sender, EventArgs e )
+        {
+            iTimer_OpStart.Stop();
+            iTimer_OpStart.Enabled = false;
+            //
+            iParser.Parse();
+        }
+        #endregion
+
+        #region Heap reconstructor parser observer
+        private void Parser_Observer( SymbianUtils.AsyncReaderBase.TEvent aEvent, AsyncReaderBase aSender )
+		{
+			if	( InvokeRequired )
+			{
+				SymbianUtils.AsyncReaderBase.Observer observer = new SymbianUtils.AsyncReaderBase.Observer( Parser_Observer );
+				this.BeginInvoke( observer, new object[] { aEvent, aSender } );
+			}
+			else
+			{
+				switch (aEvent)
+				{
+					case SymbianUtils.AsyncReaderBase.TEvent.EReadingStarted:
+						iProgressBar.Maximum = 100; //%
+						iProgressBar.Minimum = 0; //%
+						iProgressBar.Value = 0;
+						break;
+					case SymbianUtils.AsyncReaderBase.TEvent.EReadingProgress:
+						iProgressBar.Value = iParser.Progress;
+						break;
+					case SymbianUtils.AsyncReaderBase.TEvent.EReadingComplete:
+						Close();
+						break;
+				}
+			}
+		}
+		#endregion
+
+		#region Data members
+		private readonly MemAnalysisParserBase iParser;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Dialogs/MemAnalysisParsingProgressDialog.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimer_OpStart.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisRegionalForm.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,791 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using MemAnalysisLib;
+using MemAnalysisLib.Parser;
+using SymbianUtils.Settings;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.Parser.Base;
+using MemAnalysisLib.Parser.Implementations;
+
+namespace MemAnalysisUiLib.Forms
+{
+	public class MemAnalysisRegionalForm : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer Code
+		private System.Windows.Forms.GroupBox groupBox1;
+		private System.Windows.Forms.ListView iListView;
+		private System.Windows.Forms.ColumnHeader iColRegionNumber;
+		private System.Windows.Forms.ColumnHeader iColLineNumber;
+		private System.Windows.Forms.ColumnHeader iColCountAllocs;
+		private System.Windows.Forms.ColumnHeader iColCountFrees;
+		private System.Windows.Forms.ColumnHeader iColMemAllocated;
+		private System.Windows.Forms.ColumnHeader iColMemFreed;
+		private System.Windows.Forms.ColumnHeader iColNet;
+		private System.Windows.Forms.ColumnHeader iColRegionText;
+		private System.Windows.Forms.GroupBox groupBox2;
+		private System.Windows.Forms.TextBox iMarkerStartText;
+		private System.Windows.Forms.Label label1;
+		private System.Windows.Forms.Label label2;
+		private System.Windows.Forms.Label label3;
+		private System.Windows.Forms.TextBox iMarkerEndText;
+		private System.Windows.Forms.Panel iPnl_Upper;
+		private System.Windows.Forms.Panel iPnl_Lower;
+		private System.Windows.Forms.Splitter iSplitter_Horizontal;
+		private XPTable.Models.Table iTable;
+		private XPTable.Models.TableModel iTable_Model;
+		private XPTable.Models.ColumnModel iTable_ColModel;
+		private XPTable.Models.TextColumn iCol_MemOp;
+		private XPTable.Models.TextColumn iCol_LineNumber;
+		private XPTable.Models.TextColumn iCol_CellAddr;
+		private XPTable.Models.TextColumn iCol_AllocSize;
+		private XPTable.Models.TextColumn iCol_Type;
+		private XPTable.Models.TextColumn iCol_HeapSize;
+		private XPTable.Models.TextColumn iCol_AssociatedOp;
+		private XPTable.Models.TextColumn iCol_Symbol;
+		private System.ComponentModel.Container components = null;
+		#endregion
+
+		#region Constructors & destructor
+		public MemAnalysisRegionalForm( MemAnalysisParserBase aParser, XmlSettings aSettings )
+		{
+			InitializeComponent();
+
+			System.Diagnostics.Debug.Assert( aParser is MemAnalysisRegionalParser );
+			iParser = (MemAnalysisRegionalParser) aParser;
+			iSettings = aSettings;
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+			this.iPnl_Upper = new System.Windows.Forms.Panel();
+			this.groupBox1 = new System.Windows.Forms.GroupBox();
+			this.iListView = new System.Windows.Forms.ListView();
+			this.iColRegionNumber = new System.Windows.Forms.ColumnHeader();
+			this.iColLineNumber = new System.Windows.Forms.ColumnHeader();
+			this.iColCountAllocs = new System.Windows.Forms.ColumnHeader();
+			this.iColCountFrees = new System.Windows.Forms.ColumnHeader();
+			this.iColMemAllocated = new System.Windows.Forms.ColumnHeader();
+			this.iColMemFreed = new System.Windows.Forms.ColumnHeader();
+			this.iColNet = new System.Windows.Forms.ColumnHeader();
+			this.iColRegionText = new System.Windows.Forms.ColumnHeader();
+			this.iPnl_Lower = new System.Windows.Forms.Panel();
+			this.groupBox2 = new System.Windows.Forms.GroupBox();
+			this.iTable = new XPTable.Models.Table();
+			this.iTable_ColModel = new XPTable.Models.ColumnModel();
+			this.iCol_MemOp = new XPTable.Models.TextColumn();
+			this.iCol_LineNumber = new XPTable.Models.TextColumn();
+			this.iCol_CellAddr = new XPTable.Models.TextColumn();
+			this.iCol_Type = new XPTable.Models.TextColumn();
+			this.iCol_AllocSize = new XPTable.Models.TextColumn();
+			this.iCol_HeapSize = new XPTable.Models.TextColumn();
+			this.iCol_AssociatedOp = new XPTable.Models.TextColumn();
+			this.iCol_Symbol = new XPTable.Models.TextColumn();
+			this.iTable_Model = new XPTable.Models.TableModel();
+			this.iMarkerStartText = new System.Windows.Forms.TextBox();
+			this.label1 = new System.Windows.Forms.Label();
+			this.label2 = new System.Windows.Forms.Label();
+			this.label3 = new System.Windows.Forms.Label();
+			this.iMarkerEndText = new System.Windows.Forms.TextBox();
+			this.iSplitter_Horizontal = new System.Windows.Forms.Splitter();
+			this.iPnl_Upper.SuspendLayout();
+			this.groupBox1.SuspendLayout();
+			this.iPnl_Lower.SuspendLayout();
+			this.groupBox2.SuspendLayout();
+			((System.ComponentModel.ISupportInitialize)(this.iTable)).BeginInit();
+			this.SuspendLayout();
+			// 
+			// iPnl_Upper
+			// 
+			this.iPnl_Upper.Controls.Add(this.groupBox1);
+			this.iPnl_Upper.Dock = System.Windows.Forms.DockStyle.Top;
+			this.iPnl_Upper.Location = new System.Drawing.Point(0, 0);
+			this.iPnl_Upper.Name = "iPnl_Upper";
+			this.iPnl_Upper.Size = new System.Drawing.Size(1016, 172);
+			this.iPnl_Upper.TabIndex = 3;
+			// 
+			// groupBox1
+			// 
+			this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+				| System.Windows.Forms.AnchorStyles.Left) 
+				| System.Windows.Forms.AnchorStyles.Right)));
+			this.groupBox1.Controls.Add(this.iListView);
+			this.groupBox1.Location = new System.Drawing.Point(8, 5);
+			this.groupBox1.Name = "groupBox1";
+			this.groupBox1.Size = new System.Drawing.Size(1006, 164);
+			this.groupBox1.TabIndex = 1;
+			this.groupBox1.TabStop = false;
+			this.groupBox1.Text = "Identified regions...";
+			// 
+			// iListView
+			// 
+			this.iListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+				| System.Windows.Forms.AnchorStyles.Left) 
+				| System.Windows.Forms.AnchorStyles.Right)));
+			this.iListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
+																						this.iColRegionNumber,
+																						this.iColLineNumber,
+																						this.iColCountAllocs,
+																						this.iColCountFrees,
+																						this.iColMemAllocated,
+																						this.iColMemFreed,
+																						this.iColNet,
+																						this.iColRegionText});
+			this.iListView.FullRowSelect = true;
+			this.iListView.GridLines = true;
+			this.iListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
+			this.iListView.Location = new System.Drawing.Point(12, 20);
+			this.iListView.Name = "iListView";
+			this.iListView.Size = new System.Drawing.Size(980, 136);
+			this.iListView.TabIndex = 0;
+			this.iListView.View = System.Windows.Forms.View.Details;
+			this.iListView.SelectedIndexChanged += new System.EventHandler(this.iListView_SelectedIndexChanged);
+			// 
+			// iColRegionNumber
+			// 
+			this.iColRegionNumber.Text = "Region #";
+			// 
+			// iColLineNumber
+			// 
+			this.iColLineNumber.Text = "Line #";
+			// 
+			// iColCountAllocs
+			// 
+			this.iColCountAllocs.Text = "Alloc. Count";
+			this.iColCountAllocs.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+			this.iColCountAllocs.Width = 73;
+			// 
+			// iColCountFrees
+			// 
+			this.iColCountFrees.Text = "Free\'d Count";
+			this.iColCountFrees.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+			this.iColCountFrees.Width = 75;
+			// 
+			// iColMemAllocated
+			// 
+			this.iColMemAllocated.Text = "Allocated Memory";
+			this.iColMemAllocated.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+			this.iColMemAllocated.Width = 96;
+			// 
+			// iColMemFreed
+			// 
+			this.iColMemFreed.Text = "Free\'d Memory";
+			this.iColMemFreed.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+			this.iColMemFreed.Width = 84;
+			// 
+			// iColNet
+			// 
+			this.iColNet.Text = "Net";
+			this.iColNet.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+			this.iColNet.Width = 80;
+			// 
+			// iColRegionText
+			// 
+			this.iColRegionText.Text = "";
+			this.iColRegionText.Width = 337;
+			// 
+			// iPnl_Lower
+			// 
+			this.iPnl_Lower.Controls.Add(this.groupBox2);
+			this.iPnl_Lower.Dock = System.Windows.Forms.DockStyle.Fill;
+			this.iPnl_Lower.Location = new System.Drawing.Point(0, 172);
+			this.iPnl_Lower.Name = "iPnl_Lower";
+			this.iPnl_Lower.Size = new System.Drawing.Size(1016, 569);
+			this.iPnl_Lower.TabIndex = 4;
+			// 
+			// groupBox2
+			// 
+			this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+				| System.Windows.Forms.AnchorStyles.Left) 
+				| System.Windows.Forms.AnchorStyles.Right)));
+			this.groupBox2.Controls.Add(this.iTable);
+			this.groupBox2.Controls.Add(this.iMarkerStartText);
+			this.groupBox2.Controls.Add(this.label1);
+			this.groupBox2.Controls.Add(this.label2);
+			this.groupBox2.Controls.Add(this.label3);
+			this.groupBox2.Controls.Add(this.iMarkerEndText);
+			this.groupBox2.Location = new System.Drawing.Point(8, 5);
+			this.groupBox2.Name = "groupBox2";
+			this.groupBox2.Size = new System.Drawing.Size(1006, 558);
+			this.groupBox2.TabIndex = 2;
+			this.groupBox2.TabStop = false;
+			this.groupBox2.Text = "Memory operations within region";
+			// 
+			// iTable
+			// 
+			this.iTable.AlternatingRowColor = System.Drawing.Color.Gainsboro;
+			this.iTable.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+				| System.Windows.Forms.AnchorStyles.Left) 
+				| System.Windows.Forms.AnchorStyles.Right)));
+			this.iTable.ColumnModel = this.iTable_ColModel;
+			this.iTable.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+			this.iTable.FullRowSelect = true;
+			this.iTable.HeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
+			this.iTable.Location = new System.Drawing.Point(88, 47);
+			this.iTable.Name = "iTable";
+			this.iTable.Size = new System.Drawing.Size(904, 476);
+			this.iTable.TabIndex = 3;
+			this.iTable.TableModel = this.iTable_Model;
+			this.iTable.CellClick += new XPTable.Events.CellMouseEventHandler(this.iTable_CellClick);
+			// 
+			// iTable_ColModel
+			// 
+			this.iTable_ColModel.Columns.AddRange(new XPTable.Models.Column[] {
+																				  this.iCol_MemOp,
+																				  this.iCol_LineNumber,
+																				  this.iCol_CellAddr,
+																				  this.iCol_Type,
+																				  this.iCol_AllocSize,
+																				  this.iCol_HeapSize,
+																				  this.iCol_AssociatedOp,
+																				  this.iCol_Symbol});
+			// 
+			// iCol_MemOp
+			// 
+			this.iCol_MemOp.Text = "Op. #";
+			this.iCol_MemOp.Width = 72;
+			// 
+			// iCol_LineNumber
+			// 
+			this.iCol_LineNumber.Text = "Line";
+			this.iCol_LineNumber.Width = 62;
+			// 
+			// iCol_CellAddr
+			// 
+			this.iCol_CellAddr.Text = "Cell Addr.";
+			this.iCol_CellAddr.Width = 62;
+			// 
+			// iCol_Type
+			// 
+			this.iCol_Type.Text = "Type";
+			this.iCol_Type.Width = 110;
+			// 
+			// iCol_AllocSize
+			// 
+			this.iCol_AllocSize.Alignment = XPTable.Models.ColumnAlignment.Right;
+			this.iCol_AllocSize.Text = "Alloc. Size";
+			this.iCol_AllocSize.Width = 64;
+			// 
+			// iCol_HeapSize
+			// 
+			this.iCol_HeapSize.Alignment = XPTable.Models.ColumnAlignment.Right;
+			this.iCol_HeapSize.Text = "Heap Size";
+			this.iCol_HeapSize.Width = 64;
+			// 
+			// iCol_AssociatedOp
+			// 
+			this.iCol_AssociatedOp.Text = "Associated Op.";
+			this.iCol_AssociatedOp.Width = 170;
+			// 
+			// iCol_Symbol
+			// 
+			this.iCol_Symbol.Text = "Symbol";
+			this.iCol_Symbol.Width = 270;
+			// 
+			// iMarkerStartText
+			// 
+			this.iMarkerStartText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
+				| System.Windows.Forms.AnchorStyles.Right)));
+			this.iMarkerStartText.Location = new System.Drawing.Point(88, 22);
+			this.iMarkerStartText.Name = "iMarkerStartText";
+			this.iMarkerStartText.ReadOnly = true;
+			this.iMarkerStartText.Size = new System.Drawing.Size(904, 20);
+			this.iMarkerStartText.TabIndex = 1;
+			this.iMarkerStartText.Text = "";
+			// 
+			// label1
+			// 
+			this.label1.Location = new System.Drawing.Point(16, 24);
+			this.label1.Name = "label1";
+			this.label1.Size = new System.Drawing.Size(64, 16);
+			this.label1.TabIndex = 2;
+			this.label1.Text = "Start text:";
+			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+			// 
+			// label2
+			// 
+			this.label2.Location = new System.Drawing.Point(16, 52);
+			this.label2.Name = "label2";
+			this.label2.Size = new System.Drawing.Size(64, 20);
+			this.label2.TabIndex = 2;
+			this.label2.Text = "Operations:";
+			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+			// 
+			// label3
+			// 
+			this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+			this.label3.Location = new System.Drawing.Point(16, 530);
+			this.label3.Name = "label3";
+			this.label3.Size = new System.Drawing.Size(64, 16);
+			this.label3.TabIndex = 2;
+			this.label3.Text = "End text:";
+			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+			// 
+			// iMarkerEndText
+			// 
+			this.iMarkerEndText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
+				| System.Windows.Forms.AnchorStyles.Right)));
+			this.iMarkerEndText.Location = new System.Drawing.Point(88, 528);
+			this.iMarkerEndText.Name = "iMarkerEndText";
+			this.iMarkerEndText.ReadOnly = true;
+			this.iMarkerEndText.Size = new System.Drawing.Size(904, 20);
+			this.iMarkerEndText.TabIndex = 1;
+			this.iMarkerEndText.Text = "";
+			// 
+			// iSplitter_Horizontal
+			// 
+			this.iSplitter_Horizontal.Dock = System.Windows.Forms.DockStyle.Top;
+			this.iSplitter_Horizontal.Location = new System.Drawing.Point(0, 172);
+			this.iSplitter_Horizontal.Name = "iSplitter_Horizontal";
+			this.iSplitter_Horizontal.Size = new System.Drawing.Size(1016, 3);
+			this.iSplitter_Horizontal.TabIndex = 5;
+			this.iSplitter_Horizontal.TabStop = false;
+			// 
+			// MemAnalysisRegionalForm
+			// 
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.ClientSize = new System.Drawing.Size(1016, 741);
+			this.Controls.Add(this.iSplitter_Horizontal);
+			this.Controls.Add(this.iPnl_Lower);
+			this.Controls.Add(this.iPnl_Upper);
+			this.MaximizeBox = false;
+			this.MinimizeBox = false;
+			this.MinimumSize = new System.Drawing.Size(1024, 456);
+			this.Name = "MemAnalysisRegionalForm";
+			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+			this.Text = "Marker-based Analysis";
+			this.Load += new System.EventHandler(this.MemAnalysisRegionalForm_Load);
+			this.iPnl_Upper.ResumeLayout(false);
+			this.groupBox1.ResumeLayout(false);
+			this.iPnl_Lower.ResumeLayout(false);
+			this.groupBox2.ResumeLayout(false);
+			((System.ComponentModel.ISupportInitialize)(this.iTable)).EndInit();
+			this.ResumeLayout(false);
+
+		}
+		#endregion
+
+		#region Event handlers
+		private void MemAnalysisRegionalForm_Load(object sender, System.EventArgs e)
+		{
+			PrepareListView();
+		}
+
+		private void iListView_SelectedIndexChanged(object sender, System.EventArgs e)
+		{
+			if	( iListView.SelectedIndices.Count > 0 )
+			{
+				// Check the selected item isn't one of the footer (total) rows
+				ListViewItem item = iListView.SelectedItems[ 0 ];
+				if	( item.Tag != null )
+				{
+					PrepareGridForSelectedListItem();
+				}
+			}
+		}
+
+		private void iTable_CellClick(object sender, XPTable.Events.CellMouseEventArgs e)
+		{
+			if	( e.Cell.Tag is MemOpBase )
+			{
+				// Get the object
+				MemOpBase baseObject = (MemOpBase) e.Cell.Tag;
+				System.Diagnostics.Debug.Assert( baseObject.Link != null );
+
+				// Get the current collection
+				if	( iListView.SelectedIndices.Count > 0 && !iPreparingGrid )
+				{
+					ListViewItem listItem = iListView.SelectedItems[ 0 ];
+					if	( listItem.Tag != null && listItem.Tag is MemObjRegionalCollection )
+					{
+						MemObjRegionalCollection collection = (MemObjRegionalCollection) listItem.Tag;
+
+						// Get the associated (linked) collection
+						int collectionIndex;
+						int itemIndex;
+						MemOpBase linkedItem;
+						MemObjRegionalCollection linkedCollection = iParser.Data.CollectionByOperationIndex( baseObject.Link.OperationIndex,
+							baseObject.Link.Class,
+							out linkedItem,
+							out collectionIndex,
+							out itemIndex );
+
+						// Did we find a linked item?
+						if	( linkedCollection != null && linkedItem != null )
+						{
+							// Select the correct list item
+							if	( collection != linkedCollection )
+							{
+								// We need to jump to a different collection...
+								if	( linkedCollection.RegionStart.MatchedRegionText || !iParser.Options.MarkerOperationsOutsideRegionToBeIgnored )
+								{
+									if	( iParser.Options.MarkerOperationsOutsideRegionToBeIgnored )
+									{
+										collectionIndex = CollectionIndex( linkedCollection );
+									}
+									iListView.Items[ iListView.SelectedIndices[0] ].Selected = false;
+									iListView.Items[ collectionIndex ].Selected = true;
+									iListView.Select();
+								}
+							}
+
+							// Select it
+							iTable.TableModel.Selections.Clear();
+							iTable.TableModel.Selections.AddCell( itemIndex, 6 );
+							iTable.EnsureVisible( itemIndex, 6 );
+							iTable.Select();
+						}
+					}
+				}
+			}
+		}
+		#endregion
+
+		#region Internal methods
+		private void PrepareListView()
+		{
+			try
+			{
+				iListView.Enabled = false;
+				Cursor.Current = Cursors.WaitCursor;
+
+				long totalAllocCount = 0;
+				long totalFreeCount = 0;
+				long totalAllocSize = 0;
+				long totalDeallocSize = 0;
+				long totalNetSize = 0;
+
+				// Ensure that each allocation-symbol is added to the symbol listbox
+				MemObjRegionalData data = iParser.Data;
+				//
+				iListView.BeginUpdate();
+				int count = data.Count;
+				for(int i=0; i<count; i++)
+				{
+					MemObjRegionalCollection collection = data[ i ];
+					//
+					if	( collection.RegionStart.MatchedRegionText || !iParser.Options.MarkerOperationsOutsideRegionToBeIgnored  )
+					{
+						long allocCount = collection.AllocationCount;
+						long freeCount = collection.DeallocationCount;
+						long allocSize = collection.TotalAmountOfAllocatedMemory;
+						long deallocSize = collection.TotalAmountOfDeallocatedMemory;
+						long netSize = collection.TotalMemoryAllocatedButNotFreed;
+						//
+						ListViewItem item = new ListViewItem( (i+1).ToString("d8") );
+						item.SubItems.Add( collection.RegionStart.LineNumber.ToString("d8") );
+						item.SubItems.Add( allocCount.ToString() );
+						item.SubItems.Add( freeCount.ToString() );
+						item.SubItems.Add( allocSize.ToString() );
+						item.SubItems.Add( deallocSize.ToString() );
+						item.SubItems.Add( netSize.ToString() );
+						item.SubItems.Add( collection.RegionStart.RegionText );
+						item.Tag = collection;
+						iListView.Items.Add( item );
+
+						// Update totals
+						totalAllocCount += allocCount;
+						totalFreeCount += freeCount;
+						totalAllocSize += allocSize;
+						totalDeallocSize += deallocSize;
+						totalNetSize += netSize;
+					}
+					//
+					if	( count % 100 != 0 )
+						Application.DoEvents();
+				}
+
+				// Make the first item selected
+				if	( iListView.Items.Count > 0 && iListView.SelectedIndices.Count == 0 )
+				{
+					// Add total item
+					iListView.Items.Add( new ListViewItem( "" ) );
+					//
+					ListViewItem totalItem = new ListViewItem( "Totals:" );
+					totalItem.SubItems.Add( "" );
+					totalItem.SubItems.Add( totalAllocCount.ToString() );
+					totalItem.SubItems.Add( totalFreeCount.ToString() );
+					totalItem.SubItems.Add( totalAllocSize.ToString() );
+					totalItem.SubItems.Add( totalDeallocSize.ToString() );
+					totalItem.SubItems.Add( totalNetSize.ToString() );
+					totalItem.SubItems.Add( "" );
+					iListView.Items.Add( totalItem );
+					//
+					iListView.Items[0].Selected = true;
+					iListView.Select();
+				}
+
+				iListView.EndUpdate();
+			}
+			finally
+			{
+				Cursor.Current = Cursors.Default;
+				iListView.Enabled = true;
+				iListView.Select();
+			}
+		}
+
+		private void PrepareGridForSelectedListItem()
+		{
+			if	( !( iPreparingGrid || iListView.SelectedItems.Count == 0 || iListView.SelectedItems[ 0 ].Tag == null ) )
+			{
+				iPreparingGrid = true;
+				iListView.Enabled = false;
+				Cursor.Current = Cursors.WaitCursor;
+				//
+				ListViewItem listItem = iListView.SelectedItems[ 0 ];
+				MemObjRegionalCollection collection = (MemObjRegionalCollection) listItem.Tag;
+				//
+				try
+				{
+					// First update the text labels to show the marker values
+					iMarkerStartText.Text = collection.RegionStart.RegionText;
+					iMarkerEndText.Text = collection.RegionEnd.RegionText;
+
+					// Clear existing content
+					iTable.TableModel.Rows.Clear();
+
+					// Make new content
+					int count = collection.Count;
+					for(int i=0; i<count; i++)
+					{
+						// The entry we are rendering
+						MemOpBase baseObject = collection[i];
+
+						// Only initialised if we are dealing with an allocation (or realloc) type cell.
+						MemOpAllocation memObj = null;
+
+						// The color format for the entire row.
+						System.Drawing.Color rowColor = Color.Black;
+
+						// The row we are creating
+						XPTable.Models.Row row = new XPTable.Models.Row();
+						
+						// Common items
+						// ============
+						row.Cells.Add( new XPTable.Models.Cell( baseObject.OperationIndex.ToString("d6") ) );
+						row.Cells.Add( new XPTable.Models.Cell( baseObject.LineNumber.ToString("d6") ) );
+						row.Cells.Add( new XPTable.Models.Cell( baseObject.CellAddress.ToString("x8") ) );
+                        row.Cells.Add( new XPTable.Models.Cell( " " + baseObject.FunctionName ) );
+
+						// Row Color & Object Association
+						// ==============================
+						if	( baseObject is MemOpAllocation )
+						{
+							// Allocation
+							memObj = (MemOpAllocation) baseObject;
+							rowColor = Color.Red;
+						}
+						else if ( baseObject is MemOpFree )
+						{
+							// Deallocation
+							if	( baseObject.Link != null )
+							{
+								memObj = (MemOpAllocation) baseObject.Link;
+							}
+							else
+							{
+								memObj = null;
+							}
+							rowColor = Color.Green;
+						}
+						else if ( baseObject is MemOpReallocation )
+						{
+							// Reallocation
+							if	( baseObject.Link != null )
+							{
+								memObj = (MemOpAllocation) baseObject.Link;
+							}
+							else
+							{
+								memObj = null;
+							}
+							rowColor = Color.Blue;
+						}
+
+						// Allocation size
+						// ===============
+						string allocationSize = "???";
+						if	( memObj != null )
+						{
+                            allocationSize = memObj.AllocationSize.ToString();
+						}
+						row.Cells.Add( new XPTable.Models.Cell( allocationSize + "  " ) );
+
+						// Heap size
+						// =========
+						row.Cells.Add( new XPTable.Models.Cell( baseObject.HeapSize.ToString() + "  " ) );
+
+						// Associated object
+						// =================
+						MemOpAllocation symbolObject = memObj;
+						if	( memObj != null && baseObject.Link != null )
+						{
+							// If we have an associated link item, we can connect the two items together
+							string associatedText = string.Empty;
+							if	( baseObject.IsAllocationType )
+							{
+								associatedText = "Free'd by op #:  " + baseObject.Link.OperationIndex.ToString("d5");
+							}
+							else if ( baseObject.IsReallocationType )
+							{
+								associatedText = "First alloc'd by op #: " + baseObject.Link.OperationIndex.ToString("d5");
+								symbolObject = ( baseObject.Link as MemOpAllocation );
+							}
+							else
+							{
+								associatedText = "Alloc'd by op #: " + baseObject.Link.OperationIndex.ToString("d5");
+							}
+
+							// We store the object with the cell so that we can handle hyperlinks between
+							// associated objects.
+							XPTable.Models.Cell associatedCell = new XPTable.Models.Cell( associatedText );
+							associatedCell.Tag = baseObject;
+
+							// Make it look like a hyperlink
+							associatedCell.Font = new Font( iTable.Font.FontFamily.Name, iTable.Font.SizeInPoints, System.Drawing.FontStyle.Underline );
+
+							// Add the cell to the row
+							row.Cells.Add( associatedCell );
+						}
+						else
+						{
+							if	( baseObject.IsAllocationType )
+							{
+								if	( memObj != null )
+								{
+									symbolObject = memObj;
+								}
+
+								rowColor = Color.Red;
+								row.Font = new System.Drawing.Font( iTable.Font.FontFamily.Name, iTable.Font.SizeInPoints, System.Drawing.FontStyle.Bold );
+								row.Cells.Add( new XPTable.Models.Cell( "Object never free'd!" ) );
+							}
+							else
+							{
+								row.Cells.Add( new XPTable.Models.Cell( "???!" ) );
+							}
+						}
+
+						// Symbol
+						// ======
+						string symbol = string.Empty;
+                        if ( symbolObject != null && symbolObject.LinkRegisterSymbol != null )
+						{
+                            symbol = memObj.LinkRegisterSymbol.Symbol.ToString();
+						}
+						row.Cells.Add( new XPTable.Models.Cell( symbol ) );
+
+						// Set row color
+						// =============
+						row.ForeColor = rowColor;
+
+						// Add row
+						// =======
+						iTable.TableModel.Rows.Add( row );
+					}
+
+					// If no items, then dim table
+					iTable.Enabled = ( count > 0 );
+				}
+				finally
+				{
+					Cursor.Current = Cursors.Default;
+					iPreparingGrid = false;
+					iListView.Enabled = true;
+					iListView.Select();
+				}
+			}
+		}
+
+		private int CollectionIndex( MemObjRegionalCollection aCollection )
+		{
+			int ret = -1;
+			int index = 0;
+			//
+			int count = iListView.Items.Count;
+			foreach( ListViewItem item in iListView.Items )
+			{
+				if	( item.Tag != null )
+				{
+					MemObjRegionalCollection col = (MemObjRegionalCollection) item.Tag;
+					if	( col == aCollection )
+					{
+						index = ret;
+						break;
+					}
+				}
+				else
+				{
+					break;
+				}
+
+				++index;
+			}
+			//
+			return index;
+		}
+		#endregion
+
+		#region Data members
+		private bool iPreparingGrid = false;
+		private MemAnalysisRegionalParser iParser;
+		private XmlSettings iSettings;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisRegionalForm.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,388 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 1.3
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">1.3</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1">this is my long string</data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        [base64 mime encoded serialized .NET Framework object]
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        [base64 mime encoded string representing a byte array form of the .NET Framework object]
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used forserialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>1.3</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="iPnl_Upper.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="iPnl_Upper.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iPnl_Upper.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="iPnl_Upper.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iPnl_Upper.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="iPnl_Upper.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="groupBox1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="groupBox1.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="groupBox1.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="groupBox1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="groupBox1.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="groupBox1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iListView.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iListView.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iListView.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColRegionNumber.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColRegionNumber.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColLineNumber.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColLineNumber.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColCountAllocs.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColCountAllocs.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColCountFrees.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColCountFrees.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColMemAllocated.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColMemAllocated.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColMemFreed.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColMemFreed.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColNet.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColNet.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColRegionText.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iColRegionText.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iPnl_Lower.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iPnl_Lower.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="iPnl_Lower.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iPnl_Lower.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="iPnl_Lower.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="iPnl_Lower.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="groupBox2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="groupBox2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="groupBox2.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="groupBox2.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="groupBox2.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="groupBox2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iTable_ColModel.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable_ColModel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable_ColModel.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>129, 17</value>
+  </data>
+  <data name="iCol_MemOp.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_MemOp.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_LineNumber.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_LineNumber.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_CellAddr.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_CellAddr.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_Type.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_Type.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_AllocSize.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_AllocSize.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_HeapSize.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_HeapSize.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_AssociatedOp.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_AssociatedOp.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_Symbol.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iCol_Symbol.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable_Model.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable_Model.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iTable_Model.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </data>
+  <data name="iMarkerStartText.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iMarkerStartText.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iMarkerStartText.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="label1.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="label1.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="label1.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="label2.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="label2.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="label2.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="label3.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="label3.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="label3.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iMarkerEndText.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iMarkerEndText.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iMarkerEndText.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iSplitter_Horizontal.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="iSplitter_Horizontal.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="iSplitter_Horizontal.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+  <data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>(Default)</value>
+  </data>
+  <data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.Name">
+    <value>MemAnalysisRegionalForm</value>
+  </data>
+  <data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>False</value>
+  </data>
+  <data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>8, 8</value>
+  </data>
+  <data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>80</value>
+  </data>
+  <data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </data>
+  <data name="$this.DefaultModifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>Private</value>
+  </data>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisStatisticalForm.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,829 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using MemAnalysisLib;
+using MemAnalysisLib.Parser;
+using SymbianUtils.Settings;
+using MemAnalysisLib.MemoryOperations.Class;
+using MemAnalysisLib.MemoryOperations.Functions;
+using MemAnalysisLib.MemoryOperations.Operations;
+using MemAnalysisLib.Parser.Base;
+using MemAnalysisLib.Parser.Implementations;
+
+namespace MemAnalysisUiLib.Forms
+{
+	public class MemAnalysisStatisticalForm : System.Windows.Forms.Form
+	{
+		#region Windows Form Designer Code
+        private System.Windows.Forms.Button iCloseButton;
+        private System.Windows.Forms.Timer iTimerRefreshGrid;
+        private XPTable.Models.TextColumn iGridCol_MemOp;
+        private XPTable.Models.TextColumn iGridCol_LineNumber;
+        private XPTable.Models.TextColumn iGridCol_CellAddr;
+        private XPTable.Models.TextColumn iGridCol_AllocSize;
+        private XPTable.Models.TextColumn iGridCol_Type;
+        private XPTable.Models.TextColumn iGridCol_HeapSize;
+        private XPTable.Models.TextColumn iGridCol_AssociatedOp;
+        private XPTable.Models.ColumnModel iGrid_ColModel;
+        private XPTable.Models.TableModel iGrid_TableModel;
+        private MenuStrip menuStrip1;
+        private ToolStripMenuItem iMenuItem_File;
+        private SplitContainer iSplitContainer;
+        private GroupBox groupBox32;
+        private ListView iListView;
+        private ColumnHeader iColHdrTotals;
+        private ColumnHeader iColHdrObjectAllocCount;
+        private ColumnHeader iColHdrObjectFreeCount;
+        private ColumnHeader iColHdrTotalAllocSize;
+        private ColumnHeader iColHdrFreedMemory;
+        private ColumnHeader iColHdrNetAllocSize;
+        private ColumnHeader iColHdrSymbolName;
+        private GroupBox iMemAnalysisDetailedInfoForSymbolGroupBox;
+        private XPTable.Models.Table iGrid;
+        private ToolStripMenuItem iMenuItem_File_SaveAs;
+        private ToolStripMenuItem iMenuItem_File_Exit;
+        private Button iBT_CopyToClipboard;
+		private System.ComponentModel.IContainer components;
+		#endregion
+
+		#region Constructors & destructor
+		public MemAnalysisStatisticalForm( MemAnalysisParserBase aParser, XmlSettings aSettings )
+		{
+			InitializeComponent();
+
+			System.Diagnostics.Debug.Assert( aParser is MemAnalysisStatisticalParser );
+			iParser = (MemAnalysisStatisticalParser) aParser;
+			iSettings = aSettings;
+		}
+
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if(components != null)
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+		#endregion
+
+		#region Windows Form Designer generated code
+		private void InitializeComponent()
+		{
+            this.components = new System.ComponentModel.Container();
+            this.iCloseButton = new System.Windows.Forms.Button();
+            this.iTimerRefreshGrid = new System.Windows.Forms.Timer( this.components );
+            this.iGrid_ColModel = new XPTable.Models.ColumnModel();
+            this.iGridCol_MemOp = new XPTable.Models.TextColumn();
+            this.iGridCol_LineNumber = new XPTable.Models.TextColumn();
+            this.iGridCol_CellAddr = new XPTable.Models.TextColumn();
+            this.iGridCol_Type = new XPTable.Models.TextColumn();
+            this.iGridCol_AllocSize = new XPTable.Models.TextColumn();
+            this.iGridCol_HeapSize = new XPTable.Models.TextColumn();
+            this.iGridCol_AssociatedOp = new XPTable.Models.TextColumn();
+            this.iGrid_TableModel = new XPTable.Models.TableModel();
+            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
+            this.iMenuItem_File = new System.Windows.Forms.ToolStripMenuItem();
+            this.iMenuItem_File_SaveAs = new System.Windows.Forms.ToolStripMenuItem();
+            this.iMenuItem_File_Exit = new System.Windows.Forms.ToolStripMenuItem();
+            this.iSplitContainer = new System.Windows.Forms.SplitContainer();
+            this.groupBox32 = new System.Windows.Forms.GroupBox();
+            this.iListView = new System.Windows.Forms.ListView();
+            this.iColHdrTotals = new System.Windows.Forms.ColumnHeader();
+            this.iColHdrObjectAllocCount = new System.Windows.Forms.ColumnHeader();
+            this.iColHdrObjectFreeCount = new System.Windows.Forms.ColumnHeader();
+            this.iColHdrTotalAllocSize = new System.Windows.Forms.ColumnHeader();
+            this.iColHdrFreedMemory = new System.Windows.Forms.ColumnHeader();
+            this.iColHdrNetAllocSize = new System.Windows.Forms.ColumnHeader();
+            this.iColHdrSymbolName = new System.Windows.Forms.ColumnHeader();
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox = new System.Windows.Forms.GroupBox();
+            this.iBT_CopyToClipboard = new System.Windows.Forms.Button();
+            this.iGrid = new XPTable.Models.Table();
+            this.menuStrip1.SuspendLayout();
+            this.iSplitContainer.Panel1.SuspendLayout();
+            this.iSplitContainer.Panel2.SuspendLayout();
+            this.iSplitContainer.SuspendLayout();
+            this.groupBox32.SuspendLayout();
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.SuspendLayout();
+            ( (System.ComponentModel.ISupportInitialize) ( this.iGrid ) ).BeginInit();
+            this.SuspendLayout();
+            // 
+            // iCloseButton
+            // 
+            this.iCloseButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.iCloseButton.Location = new System.Drawing.Point( 439, 680 );
+            this.iCloseButton.Name = "iCloseButton";
+            this.iCloseButton.Size = new System.Drawing.Size( 75, 23 );
+            this.iCloseButton.TabIndex = 51;
+            this.iCloseButton.Text = "Close";
+            this.iCloseButton.Click += new System.EventHandler( this.iCloseButton_Click );
+            // 
+            // iTimerRefreshGrid
+            // 
+            this.iTimerRefreshGrid.Interval = 200;
+            this.iTimerRefreshGrid.Tick += new System.EventHandler( this.iTimerRefreshGrid_Tick );
+            // 
+            // iGrid_ColModel
+            // 
+            this.iGrid_ColModel.Columns.AddRange( new XPTable.Models.Column[] {
+            this.iGridCol_MemOp,
+            this.iGridCol_LineNumber,
+            this.iGridCol_CellAddr,
+            this.iGridCol_Type,
+            this.iGridCol_AllocSize,
+            this.iGridCol_HeapSize,
+            this.iGridCol_AssociatedOp} );
+            // 
+            // iGridCol_MemOp
+            // 
+            this.iGridCol_MemOp.Text = "Op. #";
+            this.iGridCol_MemOp.Width = 72;
+            // 
+            // iGridCol_LineNumber
+            // 
+            this.iGridCol_LineNumber.Text = "Line";
+            this.iGridCol_LineNumber.Width = 62;
+            // 
+            // iGridCol_CellAddr
+            // 
+            this.iGridCol_CellAddr.Text = "Cell Addr.";
+            this.iGridCol_CellAddr.Width = 62;
+            // 
+            // iGridCol_Type
+            // 
+            this.iGridCol_Type.Text = "Type";
+            this.iGridCol_Type.Width = 110;
+            // 
+            // iGridCol_AllocSize
+            // 
+            this.iGridCol_AllocSize.Alignment = XPTable.Models.ColumnAlignment.Right;
+            this.iGridCol_AllocSize.Text = "Alloc. Size";
+            this.iGridCol_AllocSize.Width = 64;
+            // 
+            // iGridCol_HeapSize
+            // 
+            this.iGridCol_HeapSize.Alignment = XPTable.Models.ColumnAlignment.Right;
+            this.iGridCol_HeapSize.Text = "Heap Size";
+            this.iGridCol_HeapSize.Width = 64;
+            // 
+            // iGridCol_AssociatedOp
+            // 
+            this.iGridCol_AssociatedOp.Text = "Associated Op.";
+            this.iGridCol_AssociatedOp.Width = 170;
+            // 
+            // menuStrip1
+            // 
+            this.menuStrip1.Items.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iMenuItem_File} );
+            this.menuStrip1.Location = new System.Drawing.Point( 0, 0 );
+            this.menuStrip1.Name = "menuStrip1";
+            this.menuStrip1.Size = new System.Drawing.Size( 738, 24 );
+            this.menuStrip1.TabIndex = 53;
+            this.menuStrip1.Text = "menuStrip1";
+            // 
+            // iMenuItem_File
+            // 
+            this.iMenuItem_File.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
+            this.iMenuItem_File_SaveAs,
+            this.iMenuItem_File_Exit} );
+            this.iMenuItem_File.Name = "iMenuItem_File";
+            this.iMenuItem_File.Size = new System.Drawing.Size( 35, 20 );
+            this.iMenuItem_File.Text = "&File";
+            // 
+            // iMenuItem_File_SaveAs
+            // 
+            this.iMenuItem_File_SaveAs.Name = "iMenuItem_File_SaveAs";
+            this.iMenuItem_File_SaveAs.Size = new System.Drawing.Size( 152, 22 );
+            this.iMenuItem_File_SaveAs.Text = "Save &As...";
+            this.iMenuItem_File_SaveAs.Click += new System.EventHandler( this.iMenuItem_File_SaveAs_Click );
+            // 
+            // iMenuItem_File_Exit
+            // 
+            this.iMenuItem_File_Exit.Name = "iMenuItem_File_Exit";
+            this.iMenuItem_File_Exit.Size = new System.Drawing.Size( 152, 22 );
+            this.iMenuItem_File_Exit.Text = "E&xit";
+            this.iMenuItem_File_Exit.Click += new System.EventHandler( this.iMenuItem_File_Exit_Click );
+            // 
+            // iSplitContainer
+            // 
+            this.iSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iSplitContainer.Location = new System.Drawing.Point( 0, 24 );
+            this.iSplitContainer.Name = "iSplitContainer";
+            this.iSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+            // 
+            // iSplitContainer.Panel1
+            // 
+            this.iSplitContainer.Panel1.Controls.Add( this.groupBox32 );
+            // 
+            // iSplitContainer.Panel2
+            // 
+            this.iSplitContainer.Panel2.Controls.Add( this.iMemAnalysisDetailedInfoForSymbolGroupBox );
+            this.iSplitContainer.Size = new System.Drawing.Size( 738, 425 );
+            this.iSplitContainer.SplitterDistance = 116;
+            this.iSplitContainer.TabIndex = 54;
+            // 
+            // groupBox32
+            // 
+            this.groupBox32.Controls.Add( this.iListView );
+            this.groupBox32.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.groupBox32.Location = new System.Drawing.Point( 0, 0 );
+            this.groupBox32.Name = "groupBox32";
+            this.groupBox32.Size = new System.Drawing.Size( 738, 116 );
+            this.groupBox32.TabIndex = 51;
+            this.groupBox32.TabStop = false;
+            this.groupBox32.Text = "Memory Analysis by Symbol";
+            // 
+            // iListView
+            // 
+            this.iListView.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iListView.Columns.AddRange( new System.Windows.Forms.ColumnHeader[] {
+            this.iColHdrTotals,
+            this.iColHdrObjectAllocCount,
+            this.iColHdrObjectFreeCount,
+            this.iColHdrTotalAllocSize,
+            this.iColHdrFreedMemory,
+            this.iColHdrNetAllocSize,
+            this.iColHdrSymbolName} );
+            this.iListView.Font = new System.Drawing.Font( "Lucida Sans Unicode", 7.25F );
+            this.iListView.FullRowSelect = true;
+            this.iListView.GridLines = true;
+            this.iListView.Location = new System.Drawing.Point( 6, 16 );
+            this.iListView.MultiSelect = false;
+            this.iListView.Name = "iListView";
+            this.iListView.Size = new System.Drawing.Size( 724, 94 );
+            this.iListView.TabIndex = 47;
+            this.iListView.UseCompatibleStateImageBehavior = false;
+            this.iListView.View = System.Windows.Forms.View.Details;
+            this.iListView.SelectedIndexChanged += new System.EventHandler( this.iListView_SelectedIndexChanged );
+            // 
+            // iColHdrTotals
+            // 
+            this.iColHdrTotals.Text = "";
+            this.iColHdrTotals.Width = 57;
+            // 
+            // iColHdrObjectAllocCount
+            // 
+            this.iColHdrObjectAllocCount.Text = "Alloc. Count";
+            this.iColHdrObjectAllocCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.iColHdrObjectAllocCount.Width = 83;
+            // 
+            // iColHdrObjectFreeCount
+            // 
+            this.iColHdrObjectFreeCount.Text = "Free\'d Count";
+            this.iColHdrObjectFreeCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.iColHdrObjectFreeCount.Width = 81;
+            // 
+            // iColHdrTotalAllocSize
+            // 
+            this.iColHdrTotalAllocSize.Text = "Allocated Memory";
+            this.iColHdrTotalAllocSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.iColHdrTotalAllocSize.Width = 100;
+            // 
+            // iColHdrFreedMemory
+            // 
+            this.iColHdrFreedMemory.Text = "Free\'d Memory";
+            this.iColHdrFreedMemory.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.iColHdrFreedMemory.Width = 84;
+            // 
+            // iColHdrNetAllocSize
+            // 
+            this.iColHdrNetAllocSize.Text = "Net";
+            this.iColHdrNetAllocSize.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
+            this.iColHdrNetAllocSize.Width = 108;
+            // 
+            // iColHdrSymbolName
+            // 
+            this.iColHdrSymbolName.Text = "Symbol Name";
+            this.iColHdrSymbolName.Width = 362;
+            // 
+            // iMemAnalysisDetailedInfoForSymbolGroupBox
+            // 
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.Controls.Add( this.iBT_CopyToClipboard );
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.Controls.Add( this.iGrid );
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.Location = new System.Drawing.Point( 0, 0 );
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.Name = "iMemAnalysisDetailedInfoForSymbolGroupBox";
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.Size = new System.Drawing.Size( 738, 305 );
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.TabIndex = 52;
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.TabStop = false;
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.Text = "Detailed Analysis for Symbol";
+            // 
+            // iBT_CopyToClipboard
+            // 
+            this.iBT_CopyToClipboard.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iBT_CopyToClipboard.Location = new System.Drawing.Point( 7, 270 );
+            this.iBT_CopyToClipboard.Name = "iBT_CopyToClipboard";
+            this.iBT_CopyToClipboard.Size = new System.Drawing.Size( 723, 31 );
+            this.iBT_CopyToClipboard.TabIndex = 1;
+            this.iBT_CopyToClipboard.Text = "Copy to Clipboard...";
+            this.iBT_CopyToClipboard.UseVisualStyleBackColor = true;
+            // 
+            // iGrid
+            // 
+            this.iGrid.AlternatingRowColor = System.Drawing.Color.WhiteSmoke;
+            this.iGrid.Anchor = ( (System.Windows.Forms.AnchorStyles) ( ( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom )
+                        | System.Windows.Forms.AnchorStyles.Left )
+                        | System.Windows.Forms.AnchorStyles.Right ) ) );
+            this.iGrid.ColumnModel = this.iGrid_ColModel;
+            this.iGrid.Font = new System.Drawing.Font( "Microsoft Sans Serif", 7.25F );
+            this.iGrid.FullRowSelect = true;
+            this.iGrid.GridLines = XPTable.Models.GridLines.Both;
+            this.iGrid.HeaderFont = new System.Drawing.Font( "Lucida Sans Unicode", 7.25F );
+            this.iGrid.Location = new System.Drawing.Point( 7, 19 );
+            this.iGrid.Name = "iGrid";
+            this.iGrid.Size = new System.Drawing.Size( 723, 249 );
+            this.iGrid.TabIndex = 0;
+            this.iGrid.TableModel = this.iGrid_TableModel;
+            this.iGrid.KeyDown += new System.Windows.Forms.KeyEventHandler( this.iGrid_KeyDown );
+            this.iGrid.CellClick += new XPTable.Events.CellMouseEventHandler( this.iGrid_CellClick );
+            // 
+            // MemAnalysisStatisticalForm
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size( 5, 13 );
+            this.ClientSize = new System.Drawing.Size( 738, 449 );
+            this.Controls.Add( this.iSplitContainer );
+            this.Controls.Add( this.iCloseButton );
+            this.Controls.Add( this.menuStrip1 );
+            this.Name = "MemAnalysisStatisticalForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Memory Analysis";
+            this.Load += new System.EventHandler( this.MemAnalysisForm_Load );
+            this.menuStrip1.ResumeLayout( false );
+            this.menuStrip1.PerformLayout();
+            this.iSplitContainer.Panel1.ResumeLayout( false );
+            this.iSplitContainer.Panel2.ResumeLayout( false );
+            this.iSplitContainer.ResumeLayout( false );
+            this.groupBox32.ResumeLayout( false );
+            this.iMemAnalysisDetailedInfoForSymbolGroupBox.ResumeLayout( false );
+            ( (System.ComponentModel.ISupportInitialize) ( this.iGrid ) ).EndInit();
+            this.ResumeLayout( false );
+            this.PerformLayout();
+
+		}
+		#endregion
+
+		#region Event handlers
+		private void MemAnalysisForm_Load(object sender, System.EventArgs e)
+		{
+			PrepareMemoryAnalysisData();
+		}
+
+		private void iCloseButton_Click(object sender, System.EventArgs e)
+		{
+			this.Close();
+		}
+
+		private void iTimerRefreshGrid_Tick(object sender, System.EventArgs e)
+		{
+			lock( this )
+			{
+				iTimerRefreshGrid.Enabled = false;
+				iTimerRefreshGrid.Stop();
+				UpdateMemoryAnalysisGridForSelectedSymbol();
+			}
+		}
+
+		private void iListView_SelectedIndexChanged(object sender, System.EventArgs e)
+		{
+			if	( iListView.SelectedIndices.Count > 0 )
+			{
+				// Check the selected item isn't one of the footer (total) rows
+				int selectedIndex = iListView.SelectedIndices[0];
+				if	( selectedIndex >= 0 && selectedIndex < iListView.Items.Count - 2 )
+				{
+					// Start the timer - this will refresh the grid when it expires...
+					lock( this )
+					{
+						iGridIsDirty = true;
+						iStopPopulatingGrid = true;
+						//
+						iTimerRefreshGrid.Stop();
+						iTimerRefreshGrid.Enabled = true;
+						iTimerRefreshGrid.Start();
+					}
+				}
+			}
+		}
+
+		private void iGrid_KeyDown(object sender, KeyEventArgs e)
+		{
+			if	( e.KeyCode == Keys.C && e.Control && iListView.SelectedIndices.Count > 0 )
+			{
+                XPTable.Models.Row[] rows = iGrid.SelectedItems;
+                if ( rows.Length > 0 && rows[ 0 ].Tag != null && rows[ 0 ].Tag is MemOpBase )
+                {
+                    MemOpBase op = rows[ 0 ].Tag as MemOpBase;
+                    //
+                    Clipboard.SetDataObject( op.ToString(), true );
+					e.Handled = true;
+                }
+			}
+		}
+
+        private void iGrid_CellClick( object sender, XPTable.Events.CellMouseEventArgs e )
+        {
+            if ( e.Cell.Tag != null && e.Cell.Tag is MemOpBase )
+            {
+				// Get the object & collection
+				MemOpBase currentObject = (MemOpBase) e.Cell.Tag;
+                MemObjStatisticalCollection collection = (MemObjStatisticalCollection) currentObject.Collection;
+
+                // If we have a linked item, then we'll attempt to show it
+                if ( currentObject.Link != null )
+                {
+                    MemOpBase linkedOp = currentObject.Link;
+
+                    // We know that the linked item should be in the same collection - so search for it.
+                    int rowIndex = 0;
+                    foreach( XPTable.Models.Row row in iGrid.TableModel.Rows )
+                    {
+                        // The first row's tag has been setup to point to a MemOpBase object for the entire row.
+                        MemOpBase rowTagEntry = (MemOpBase) row.Tag;
+                        if ( rowTagEntry.CellAddress == linkedOp.CellAddress && 
+                             rowTagEntry.OperationIndex == linkedOp.OperationIndex &&
+                             rowTagEntry.AllocationNumber == linkedOp.AllocationNumber &&
+                             rowTagEntry != currentObject )
+                        {
+                            // This is the one to focus to.
+                            iGrid.TableModel.Selections.SelectCell( rowIndex, 5 );
+                            iGrid.EnsureVisible( rowIndex, 5 );
+                            iGrid.Select();
+                            break;
+                        }
+
+                        // No match...
+                        ++rowIndex;
+                    }
+                }
+            }
+        }
+
+        private void iMenuItem_File_SaveAs_Click( object sender, EventArgs e )
+        {
+
+        }
+
+        private void iMenuItem_File_Exit_Click( object sender, EventArgs e )
+        {
+            this.Close();
+        }
+        #endregion
+
+		#region Internal methods
+		private void PrepareMemoryAnalysisData()
+		{
+			try
+			{
+				Cursor.Current = Cursors.WaitCursor;
+				iListView.Enabled = false;
+
+				long totalAllocCount = 0;
+				long totalFreeCount = 0;
+				long totalAllocSize = 0;
+				long totalFreeSize = 0;
+				long totalNetSize = 0;
+
+				// Ensure that each allocation-symbol is added to the symbol listbox
+				MemObjStatisticalData data = iParser.Data;
+				//
+				iListView.BeginUpdate();
+				int count = data.CollectionCount;
+				for(int i=0; i<count; i++)
+				{
+					MemObjStatisticalCollection collection = data.CollectionAt( i );
+					if	( collection.Count > 0 )
+					{
+						System.Diagnostics.Debug.Assert( collection[0] is MemOpAllocation );
+						MemOpAllocation memObj = (MemOpAllocation) collection[0];
+						//
+						long allocCount = collection.AllocationCount;
+						long freeCount = collection.DeallocationCount;
+						long allocSize = collection.TotalAmountOfAllocatedMemory;
+						long freeSize = collection.TotalAmountOfDeallocatedMemory;
+						long netAllocSize = collection.TotalMemoryAllocatedButNotFreed;
+						//
+						ListViewItem item = new ListViewItem( "" );
+						item.Tag = collection;
+						item.SubItems.Add( allocCount.ToString() );
+						item.SubItems.Add( freeCount.ToString() );
+						item.SubItems.Add( allocSize.ToString() );
+						item.SubItems.Add( freeSize.ToString() );
+						item.SubItems.Add( netAllocSize.ToString() );
+						string symbolText = "Unknown";
+						if	( memObj.LinkRegisterSymbol != null && memObj.LinkRegisterSymbol.Symbol != null )
+						{
+							symbolText = memObj.LinkRegisterSymbol.Symbol.ToString();
+						}
+						item.SubItems.Add( symbolText );
+						iListView.Items.Add( item );
+
+						// Update totals
+						totalAllocCount += allocCount;
+						totalFreeCount += freeCount;
+						totalAllocSize += allocSize;
+						totalFreeSize += freeSize;
+						totalNetSize += netAllocSize;
+					}
+
+					if	( count % 100 != 0 )
+						Application.DoEvents();
+				}
+				iListView.EndUpdate();
+
+				// Make the first item selected
+				if	( iListView.Items.Count > 0 && iListView.SelectedIndices.Count == 0 )
+				{
+					// Add total item
+					iListView.Items.Add( new ListViewItem( "" ) );
+					//
+					ListViewItem totalItem = new ListViewItem( "Totals:" );
+					totalItem.SubItems.Add( totalAllocCount.ToString() );
+					totalItem.SubItems.Add( totalFreeCount.ToString() );
+					totalItem.SubItems.Add( totalAllocSize.ToString() );
+					totalItem.SubItems.Add( totalFreeSize.ToString() );
+					totalItem.SubItems.Add( totalNetSize.ToString() );
+					totalItem.SubItems.Add( "" );
+					iListView.Items.Add( totalItem );
+					//
+					iListView.Items[0].Selected = true;
+					iListView.Select();
+				}
+			}
+			finally
+			{
+				Cursor.Current = Cursors.Default;
+				iListView.Enabled = true;
+				iListView.Select();
+			}
+		}
+
+        private void PopulateTableRows( MemObjStatisticalCollection aCollection )
+        {
+            // Clear existing content
+            iGrid.BeginUpdate();
+            iGrid.TableModel.Rows.Clear();
+            iGrid.Tag = aCollection;
+
+            // Make new content
+            int count = aCollection.Count;
+            for ( int i = 0; i < count; i++ )
+            {
+                // The entry we are rendering
+                MemOpBase baseObject = aCollection[ i ];
+
+                // Only initialised if we are dealing with an allocation (or realloc) type cell.
+                MemOpAllocation memObj = null;
+
+                // The color format for the entire row.
+                System.Drawing.Color rowColor = Color.Black;
+
+                // The row we are creating
+                XPTable.Models.Row row = new XPTable.Models.Row();
+
+                // Set tag for the row
+                row.Tag = baseObject;
+
+                // Common items
+                // ============
+                XPTable.Models.Cell opIndexCell = new XPTable.Models.Cell( baseObject.OperationIndex.ToString( "d6" ) );
+                row.Cells.Add( opIndexCell );
+                XPTable.Models.Cell lineNumberCell = new XPTable.Models.Cell( baseObject.LineNumber.ToString( "d6" ) );
+                row.Cells.Add( lineNumberCell );
+                XPTable.Models.Cell cellAddressCell = new XPTable.Models.Cell( baseObject.CellAddress.ToString( "x8" ) );
+                row.Cells.Add( cellAddressCell );
+                XPTable.Models.Cell functionCell = new XPTable.Models.Cell( " " + baseObject.FunctionName );
+                row.Cells.Add( functionCell );
+
+                // Row Color & Object Association
+                // ==============================
+                if ( baseObject is MemOpAllocation )
+                {
+                    // Allocation
+                    memObj = (MemOpAllocation) baseObject;
+                    rowColor = Color.Blue;
+                }
+                else if ( baseObject is MemOpFree )
+                {
+                    // Deallocation
+                    if ( baseObject.Link != null )
+                    {
+                        memObj = (MemOpAllocation) baseObject.Link;
+                    }
+                    else
+                    {
+                        memObj = null;
+                    }
+                    rowColor = Color.Green;
+                }
+                else if ( baseObject is MemOpReallocation )
+                {
+                    // Reallocation
+                    if ( baseObject.Link != null )
+                    {
+                        memObj = (MemOpAllocation) baseObject.Link;
+                    }
+                    else
+                    {
+                        memObj = null;
+                    }
+                    rowColor = Color.Purple;
+                }
+
+                // Allocation size
+                // ===============
+                string allocationSize = "???";
+                if ( memObj != null )
+                {
+                    allocationSize = memObj.AllocationSize.ToString();
+                }
+                row.Cells.Add( new XPTable.Models.Cell( allocationSize + "  " ) );
+
+                // Heap size
+                // =========
+                row.Cells.Add( new XPTable.Models.Cell( baseObject.HeapSize.ToString() + "  " ) );
+
+                // Associated object
+                // =================
+                MemOpAllocation symbolObject = memObj;
+                if ( memObj != null && baseObject.Link != null )
+                {
+                    // If we have an associated link item, we can connect the two items together
+                    string associatedText = string.Empty;
+                    if ( baseObject.IsAllocationType )
+                    {
+                        associatedText = "Free'd by op #:  " + baseObject.Link.OperationIndex.ToString( "d5" );
+                    }
+                    else if ( baseObject.IsReallocationType )
+                    {
+                        associatedText = "First alloc'd by op #: " + baseObject.Link.OperationIndex.ToString( "d5" );
+                        symbolObject = ( baseObject.Link as MemOpAllocation );
+                    }
+                    else
+                    {
+                        associatedText = "Alloc'd by op #: " + baseObject.Link.OperationIndex.ToString( "d5" );
+                    }
+
+                    // We store the object with the cell so that we can handle hyperlinks between
+                    // associated objects.
+                    XPTable.Models.Cell associatedCell = new XPTable.Models.Cell( associatedText );
+                    associatedCell.Tag = baseObject;
+
+                    // Make it look like a hyperlink
+                    associatedCell.Font = new Font( iGrid.Font.FontFamily.Name, iGrid.Font.SizeInPoints, System.Drawing.FontStyle.Underline );
+
+                    // Add the cell to the row
+                    row.Cells.Add( associatedCell );
+                }
+                else
+                {
+                    if ( baseObject.IsAllocationType )
+                    {
+                        if ( memObj != null )
+                        {
+                            symbolObject = memObj;
+                        }
+
+                        rowColor = Color.Red;
+                        row.Font = new System.Drawing.Font( iGrid.Font.FontFamily.Name, iGrid.Font.SizeInPoints, System.Drawing.FontStyle.Regular );
+                        row.Cells.Add( new XPTable.Models.Cell( "Object never free'd!" ) );
+                    }
+                    else
+                    {
+                        row.Cells.Add( new XPTable.Models.Cell( "???!" ) );
+                    }
+                }
+
+                // Set row color
+                // =============
+                row.ForeColor = rowColor;
+
+                // Add row
+                // =======
+                iGrid.TableModel.Rows.Add( row );
+
+                // Event handling
+                // ==============
+                if ( i % 100 != 0 )
+                {
+                    Application.DoEvents();
+                }
+                lock ( this )
+                {
+                    if ( iStopPopulatingGrid )
+                    {
+                        break;
+                    }
+                }
+            }
+
+            // If no items, then dim table
+            iGrid.Enabled = ( count > 0 );
+            iGrid.EndUpdate();
+        }
+
+        private void UpdateMemoryAnalysisGridForSelectedSymbol()
+		{
+			lock( this )
+			{
+				iStopPopulatingGrid = false;
+			}
+			//
+			try
+			{
+				Cursor.Current = Cursors.WaitCursor;
+				//
+				if	( iListView.SelectedIndices.Count > 0 )
+				{
+					MemObjStatisticalData data = iParser.Data;
+					int selectedIndex = iListView.SelectedIndices[0];
+
+					ListViewItem selectedItem = iListView.SelectedItems[ 0 ];
+					if	( selectedItem.Tag != null )
+					{
+						MemObjStatisticalCollection collection = (MemObjStatisticalCollection) selectedItem.Tag;
+						MemOpBase baseObject = collection[0];
+						System.Diagnostics.Debug.Assert( baseObject is MemOpAllocation );
+						MemOpAllocation memObj = (MemOpAllocation) baseObject;
+						//
+                        string symbolText = "Unknown";
+						if	( memObj.LinkRegisterSymbol != null && memObj.LinkRegisterSymbol.Symbol != null )
+						{
+							symbolText = memObj.LinkRegisterSymbol.Symbol.ToString();
+						}
+						iMemAnalysisDetailedInfoForSymbolGroupBox.Text = @"Detailed Analysis for Symbol '" + symbolText + @"'";
+						//
+                        PopulateTableRows( collection );
+					}
+				}
+			}
+			catch(Exception)
+			{
+				iGridIsDirty = false;
+			}
+			finally
+			{
+				Cursor.Current = Cursors.Default;
+				iStopPopulatingGrid = false;
+				//iListView.Enabled = false;
+				//iListView.Select();
+			}
+
+			lock( this )
+			{
+				iGridIsDirty = false;
+			}
+		}
+		#endregion
+
+		#region Data members
+		private bool iGridIsDirty = false;
+		private bool iStopPopulatingGrid;
+		private MemAnalysisStatisticalParser iParser;
+		private XmlSettings iSettings;
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/Forms/MemAnalysisStatisticalForm.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="iTimerRefreshGrid.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="iGrid_ColModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>158, 17</value>
+  </metadata>
+  <metadata name="iGrid_TableModel.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>281, 17</value>
+  </metadata>
+  <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>419, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/MemAnalysisUiLib.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,148 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <ProjectType>Local</ProjectType>
+    <ProductVersion>9.0.21022</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{26214577-43FB-4411-B6D9-F0478A83012E}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ApplicationIcon>
+    </ApplicationIcon>
+    <AssemblyKeyContainerName>
+    </AssemblyKeyContainerName>
+    <AssemblyName>MemAnalysisUiLib</AssemblyName>
+    <AssemblyOriginatorKeyFile>
+    </AssemblyOriginatorKeyFile>
+    <DefaultClientScript>JScript</DefaultClientScript>
+    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+    <DefaultTargetSchema>IE50</DefaultTargetSchema>
+    <DelaySign>false</DelaySign>
+    <OutputType>Library</OutputType>
+    <RootNamespace>MemAnalysisUiLib</RootNamespace>
+    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+    <StartupObject>
+    </StartupObject>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>true</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>false</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>false</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>none</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System">
+      <Name>System</Name>
+    </Reference>
+    <Reference Include="System.Data">
+      <Name>System.Data</Name>
+    </Reference>
+    <Reference Include="System.Design">
+      <Name>System.Design</Name>
+    </Reference>
+    <Reference Include="System.Drawing">
+      <Name>System.Drawing</Name>
+    </Reference>
+    <Reference Include="System.Windows.Forms">
+      <Name>System.Windows.Forms</Name>
+    </Reference>
+    <Reference Include="System.Xml">
+      <Name>System.XML</Name>
+    </Reference>
+    <Reference Include="XPTable, Version=1.1.13.21130, Culture=neutral, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\..\PerfToolsSharedLibraries\3rd Party\XPTable\bin\Debug\XPTable.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Dialogs\MemAnalysisParsingProgressDialog.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\MemAnalysisRegionalForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Forms\MemAnalysisStatisticalForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <EmbeddedResource Include="Dialogs\MemAnalysisParsingProgressDialog.resx">
+      <DependentUpon>MemAnalysisParsingProgressDialog.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Forms\MemAnalysisRegionalForm.resx">
+      <DependentUpon>MemAnalysisRegionalForm.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Forms\MemAnalysisStatisticalForm.resx">
+      <DependentUpon>MemAnalysisStatisticalForm.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\PerfToolsSharedLibraries\Engine\SymbolLib\SymbolLib.csproj">
+      <Project>{C657DF4B-FA67-47DD-89FC-A45583646184}</Project>
+      <Name>SymbolLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\Engine\MemAnalysisLib\MemAnalysisLib.csproj">
+      <Project>{94F69E44-75FC-4035-9B08-920CF0E0188C}</Project>
+      <Name>MemAnalysisLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>
+    </PreBuildEvent>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/Libraries/UI/MemAnalysisUiLib/MemAnalysisUiLib.csproj.user	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,58 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <LastOpenVersion>7.10.6030</LastOpenVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ReferencePath>
+    </ReferencePath>
+    <CopyProjectDestinationFolder>
+    </CopyProjectDestinationFolder>
+    <CopyProjectUncPath>
+    </CopyProjectUncPath>
+    <CopyProjectOption>0</CopyProjectOption>
+    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectTrust>0</ProjectTrust>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
Binary file sysperfana/heapanalyser/OSS/zedgraph_source_v515.zip has changed
Binary file sysperfana/heapanalyser/UI/App.ico has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/AssemblyInfo.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("UI")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Nokia")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]		
+
+//
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the 
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing. 
+//
+// Notes: 
+//   (*) If no key is specified, the assembly is not signed.
+//   (*) KeyName refers to a key that has been installed in the Crypto Service
+//       Provider (CSP) on your machine. KeyFile refers to a file which contains
+//       a key.
+//   (*) If the KeyFile and the KeyName values are both specified, the 
+//       following processing occurs:
+//       (1) If the KeyName can be found in the CSP, that key is used.
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key 
+//           in the KeyFile is installed into the CSP and used.
+//   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+//       When specifying the KeyFile, the location of the KeyFile should be
+//       relative to the project output directory which is
+//       %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+//       located in the project directory, you would specify the AssemblyKeyFile 
+//       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+//   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+//       documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/Engine/HeapWizardEngine.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using SymbianUtils;
+using SymbianDebugLib.Engine;
+using SymbianDebugLib.PluginAPI.Types;
+using HeapLib;
+using HeapLib.Reconstructor.Misc;
+using HeapAnalyser.Engine.Types;
+
+namespace HeapAnalyser.Engine
+{
+	public class HeapWizardEngine
+	{
+		#region Enumerations
+		public enum TOperationType
+		{
+			EOperationTypeAnalyseAndView = 0,
+            EOperationTypeCompareHeapDumps,
+            EOperationTypeCompareHeapCSV,
+		}
+		#endregion
+
+		#region Constructors & destructor
+		public HeapWizardEngine( string aPrivatePathBaseDirectory, string[] aArgs )
+		{
+            iAnalysisEngine = new AnalyseEngineHeapData( this );
+            iComparsionEngineData = new ComparisonEngineHeapData( this );
+            iComparsionEngineCSV = new ComparisonEngineHeapCSV( this );
+		}
+		#endregion
+
+		#region Properties
+		public TOperationType OperationType
+		{
+			get { return iOperationType; }
+			set { iOperationType = value; }
+		}
+
+        public Options HeapDataOptions
+        {
+            get { return iHeapDataOptions; }
+            set { iHeapDataOptions = value; }
+        }
+
+        public DbgEngine DebugEngine
+        {
+            get { return iDebugEngine; }
+        }
+        #endregion
+
+        #region Analysis engines
+        public AnalyseEngineHeapData AnalysisEngine
+		{
+			get { return iAnalysisEngine; }
+		}
+
+        public ComparisonEngineHeapData ComparisonEngineData
+        {
+            get { return iComparsionEngineData; }
+        }
+
+        public ComparisonEngineHeapCSV ComparisonEngineCSV
+        {
+            get { return iComparsionEngineCSV; }
+        }
+		#endregion
+
+		#region Data members
+        private TOperationType iOperationType = TOperationType.EOperationTypeAnalyseAndView;
+        private Options iHeapDataOptions = new Options();
+        private DbgEngine iDebugEngine = new DbgEngine();
+        private readonly AnalyseEngineHeapData iAnalysisEngine;
+        private readonly ComparisonEngineHeapData iComparsionEngineData;
+        private readonly ComparisonEngineHeapCSV iComparsionEngineCSV;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/Engine/Types/AnalyseEngineHeapData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections;
+using System.Collections.Specialized;
+using SymbianDebugLib.Engine;
+using SymbianDebugLib.PluginAPI.Types;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Reconstructor;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources;
+
+namespace HeapAnalyser.Engine.Types
+{
+	public class AnalyseEngineHeapData
+	{
+		#region Constructors & destructor
+        public AnalyseEngineHeapData( HeapWizardEngine aParent )
+		{
+            iParent = aParent;
+		}
+		#endregion
+
+		#region API
+		public void CreateParser()
+		{
+            if ( iDataSource == null )
+            {
+                throw new NotSupportedException( "Data source is not yet initialised" );
+            }
+            //
+            iReconstructor = new HeapReconstructor( DataSource, ReconstructorOptions, DebugEngine );
+            HeapUiLib.Dialogs.HeapReconstructorProgressDialog.ParseLog( Reconstructor );
+		}
+		#endregion
+
+		#region Properties
+		public HeapReconstructor Reconstructor
+		{
+			get { return iReconstructor; }
+		}
+
+		public DataSource DataSource
+		{
+			get { return iDataSource; }
+			set { iDataSource = value; }
+		}
+
+        public DbgEngine DebugEngine
+		{
+			get { return iParent.DebugEngine; }
+        }
+
+		public Options ReconstructorOptions
+		{
+			get { return iParent.HeapDataOptions; }
+        }
+		#endregion
+
+		#region Internal methods
+		#endregion
+
+		#region Member data
+        private readonly HeapWizardEngine iParent;
+        //
+        private HeapReconstructor iReconstructor;
+        private DataSource iDataSource = null;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/Engine/Types/ComparisonEngineHeapCSV.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Reconstructor;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.Misc;
+
+namespace HeapAnalyser.Engine.Types
+{
+    public class ComparisonEngineHeapCSV
+    {
+		#region Constructors & destructor
+        public ComparisonEngineHeapCSV( HeapWizardEngine aParent )
+		{
+            iParent = aParent;
+		}
+		#endregion
+
+		#region API
+		#endregion
+
+		#region Properties
+        public string OutputDirectory
+		{
+            get { return iOutputDirectory; }
+            set { iOutputDirectory = value; }
+		}
+
+        public List<string> SourceFileNames
+        {
+            get { return iFileNames; }
+            set
+            {
+                iFileNames.Clear();
+                iFileNames.AddRange( value );
+            }
+        }
+		#endregion
+
+		#region Internal methods
+		#endregion
+
+		#region Member data
+        private readonly HeapWizardEngine iParent;
+        private List<string> iFileNames = new List<string>();
+        private string iOutputDirectory = string.Empty;
+		#endregion
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/Engine/Types/ComparisonEngineHeapData.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections;
+using System.Collections.Specialized;
+using System.Windows.Forms;
+using SymbianDebugLib.Engine;
+using SymbianUtils;
+using HeapLib;
+using HeapLib.Reconstructor;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.Misc;
+using HeapComparisonLib.Data;
+
+namespace HeapAnalyser.Engine.Types
+{
+    public class ComparisonEngineHeapData
+    {
+		#region Constructors & destructor
+        public ComparisonEngineHeapData( HeapWizardEngine aParent )
+		{
+            iParent = aParent;
+		}
+		#endregion
+
+		#region API
+        public void CreateReconstructors()
+		{
+            iReconstructor1 = new HeapReconstructor( DataSource1, ReconstructorOptions, DebugEngine );
+            iReconstructor2 = new HeapReconstructor( DataSource2, ReconstructorOptions, DebugEngine );
+        }
+		#endregion
+
+		#region Properties
+		public HeapReconstructor Reconstructor1
+		{
+			get { return iReconstructor1; }
+		}
+
+        public HeapReconstructor Reconstructor2
+        {
+            get { return iReconstructor2; }
+        }
+
+        public DataSource DataSource1
+		{
+            get { return iDataSource1; }
+            set { iDataSource1 = value; }
+		}
+
+        public DataSource DataSource2
+        {
+            get { return iDataSource2; }
+            set { iDataSource2 = value; }
+        }
+
+        public HeapLib.Reconstructor.Misc.Options ReconstructorOptions
+        {
+            get { return iParent.HeapDataOptions; }
+        }
+
+        public DbgEngine DebugEngine
+        {
+            get { return iParent.DebugEngine; }
+        }
+
+		public string OutputFileName
+		{
+            get { return iOutputFileName; }
+            set { iOutputFileName = value; }
+		}
+		#endregion
+
+		#region Internal methods
+		#endregion
+
+		#region Member data
+        private readonly HeapWizardEngine iParent;
+        private string iOutputFileName = string.Empty;
+        //
+		private HeapReconstructor iReconstructor1;
+        private HeapReconstructor iReconstructor2;
+        private DataSource iDataSource1 = null;
+        private DataSource iDataSource2 = null;
+		#endregion
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/EntryPoint.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Text;
+using System.Windows.Forms;
+using SymbianUtils.Settings;
+using SymbianUtils.FileSystem.Utilities;
+using SymbianUtilsUi.Dialogs;
+using HeapAnalyser.UIs;
+
+
+namespace HeapAnalyser
+{
+	public class EntryPoint
+	{
+		#region Application entry point
+		[STAThread]
+		static int Main( string[] aArgs ) 
+		{
+            int error = HeapAnalyser.Exceptions.HAUIException.KErrCommandLineNone;
+            //
+            try
+            {
+                // Enable visual styles if supported
+                if ( OSFeature.Feature.IsPresent( OSFeature.Themes ) )
+                {
+                    Application.EnableVisualStyles();
+                    Application.DoEvents();
+                }
+  
+                FSUtilities.ClearTempPath();
+
+                HAUIManager uiManager = new HAUIManager( aArgs );
+                error = uiManager.Run();
+            }
+            catch ( Exception exception )
+            {
+                SymExceptionDialog dialog = new SymExceptionDialog();
+                dialog.Exception = exception;
+                dialog.ShowDialog();
+            }
+            //
+            return error;
+        }
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/Exceptions/HAUIException.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections.Generic;
+
+namespace HeapAnalyser.Exceptions
+{
+	internal class HAUIException : Exception
+	{
+        #region Constants
+        // <summary>
+        // Indicates no error
+        // </summary>
+        public const int KErrCommandLineNone = 0;
+
+        // <summary>
+        // Indicates an unspecified or general error
+        // </summary>
+        public const int KErrCommandLineGeneral = -1;
+
+        // <summary>
+        // Indicates that one or more mandatory command line arguments was omitted
+        // </summary>
+        public const int KErrCommandLineArgumentsMissing = -2;
+
+        // <summary>
+        // Indicates that an input command was not supported or valid
+        // </summary>
+        public const int KErrCommandLineInvalidCommand = -3;
+
+        // <summary>
+        // Indicates that the specified input file was not found
+        // </summary>
+        public const int KErrCommandLineArgumentsFileNotFound = -4;
+
+        // <summary>
+        // Indicates a fatal problem when attempting to read the input file
+        // </summary>
+        public const int KErrCommandLineArgumentsFileInvalid = -5;
+
+        // <summary>
+        // Indicates source file(s) were not found or specified
+        // </summary>
+        public const int KErrCommandLineSourceFileNotFound = -6;
+
+        // <summary>
+        // Indicates debug meta data was omitted from the inputs
+        // </summary>
+        public const int KErrCommandLineDebugMetaDataMissing = -7;
+
+        // <summary>
+        // Occurs if Heap Analyser cannot find a handler for the specified command
+        // line arguments.
+        // </summary>
+        public const int KErrCommandLineUINotAvailable = -8;
+
+        // <summary>
+        // The requested analysis type is not supported
+        // </summary>
+        public const int KErrCommandLineAnalysisTypeNotSupported = -9;
+
+        // <summary>
+        // The specified analysis thread name is invalid
+        // </summary>
+        public const int KErrCommandLineAnalysisThreadNameInvalid = -10;
+
+        // <summary>
+        // The specified output data is invalid
+        // </summary>
+        public const int KErrCommandLineAnalysisOutputInvalid = -11;
+        #endregion
+        
+        #region Constructors
+        public HAUIException( string aMessage )
+            : this( aMessage, KErrCommandLineGeneral )
+		{
+		}
+       
+        public HAUIException( string aMessage, Exception aInnerException )
+            : this( aMessage, aInnerException, KErrCommandLineGeneral )
+        {
+        }
+
+        public HAUIException( string aMessage, Exception aInnerException, int aErrorCode )
+            : base( aMessage, aInnerException )
+        {
+            iErrorCode = aErrorCode;
+        }
+       
+        public HAUIException( string aMessage, int aErrorCode )
+            : base( aMessage )
+		{
+            iErrorCode = aErrorCode;
+		}
+        #endregion
+
+		#region API
+        #endregion
+
+		#region Properties
+        public int ErrorCode
+        {
+            get { return iErrorCode; }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Member data
+        private readonly int iErrorCode;
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/HeapAnalyser.csproj	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,207 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+  <PropertyGroup>
+    <ProjectType>Local</ProjectType>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{20255E8D-09BB-4524-8E10-66B22ACC6662}</ProjectGuid>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ApplicationIcon>App.ico</ApplicationIcon>
+    <AssemblyKeyContainerName>
+    </AssemblyKeyContainerName>
+    <AssemblyName>HeapAnalyser</AssemblyName>
+    <AssemblyOriginatorKeyFile>
+    </AssemblyOriginatorKeyFile>
+    <DefaultClientScript>JScript</DefaultClientScript>
+    <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
+    <DefaultTargetSchema>IE50</DefaultTargetSchema>
+    <DelaySign>false</DelaySign>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>HeapAnalyser</RootNamespace>
+    <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
+    <StartupObject>HeapAnalyser.EntryPoint</StartupObject>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <UpgradeBackupLocation>
+    </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <OutputPath>bin\Debug\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>true</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>false</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>full</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <OutputPath>bin\Release\</OutputPath>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <BaseAddress>285212672</BaseAddress>
+    <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
+    <ConfigurationOverrideFile>
+    </ConfigurationOverrideFile>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>
+    </DocumentationFile>
+    <DebugSymbols>false</DebugSymbols>
+    <FileAlignment>4096</FileAlignment>
+    <NoStdLib>false</NoStdLib>
+    <NoWarn>
+    </NoWarn>
+    <Optimize>true</Optimize>
+    <RegisterForComInterop>false</RegisterForComInterop>
+    <RemoveIntegerChecks>false</RemoveIntegerChecks>
+    <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
+    <WarningLevel>4</WarningLevel>
+    <DebugType>none</DebugType>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Content Include="App.ico" />
+    <Compile Include="AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Exceptions\HAUIException.cs" />
+    <Compile Include="UIs\Console\Files\HACmdLineFileSource.cs" />
+    <Compile Include="UIs\Console\Files\HACmdLineFSEntity.cs" />
+    <Compile Include="UIs\Console\Files\HACmdLineFSEntityList.cs" />
+    <Compile Include="UIs\Console\Inputs\HACmdLineInputParameters.cs" />
+    <Compile Include="UIs\Graphical\Wizard\HASetupWizard.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="UIs\Graphical\Wizard\HASetupWizard.Designer.cs">
+      <DependentUpon>HASetupWizard.cs</DependentUpon>
+    </Compile>
+    <Compile Include="UIs\HAUIManager.cs" />
+    <Compile Include="Engine\Types\ComparisonEngineHeapData.cs" />
+    <Compile Include="Engine\Types\AnalyseEngineHeapData.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Engine\HeapWizardEngine.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Engine\Types\ComparisonEngineHeapCSV.cs" />
+    <Compile Include="EntryPoint.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="UIs\Console\HAUIConsole.cs" />
+    <Compile Include="UIs\HAUI.cs" />
+    <Compile Include="UIs\Graphical\HAUIGraphical.cs" />
+    <EmbeddedResource Include="UIs\Graphical\Wizard\HASetupWizard.resx">
+      <DependentUpon>HASetupWizard.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Management" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\Engine\SymbianDebugLib\SymbianDebugLib.csproj">
+      <Project>{796DD82D-9E7D-476D-B700-086CD9A893DA}</Project>
+      <Name>SymbianDebugLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\Engine\SymbianStructuresLib\SymbianStructuresLib.csproj">
+      <Project>{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}</Project>
+      <Name>SymbianStructuresLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\Engine\SymbianSymbolLib\SymbianSymbolLib.csproj">
+      <Project>{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}</Project>
+      <Name>SymbianSymbolLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\Engine\SymbianTree\SymbianTree.csproj">
+      <Project>{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}</Project>
+      <Name>SymbianTree</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj">
+      <Project>{F6F4CE69-E73A-4917-97ED-B114DE90C92E}</Project>
+      <Name>SymbianUtils</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\Engine\SymbianXmlInputLib\SymbianXmlInputLib.csproj">
+      <Project>{56ECA873-7D1D-45E7-A583-A5388D753321}</Project>
+      <Name>SymbianXmlInputLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\UI\SymbianDebugUiLib\SymbianDebugLibUi.csproj">
+      <Project>{6C30B8C1-BF87-4626-8125-D5681B22347C}</Project>
+      <Name>SymbianDebugLibUi</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\UI\SymbianUtilsUi\SymbianUtilsUi.csproj">
+      <Project>{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}</Project>
+      <Name>SymbianUtilsUi</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\PerfToolsSharedLibraries\UI\SymbianWizardLib\SymbianWizardLib.csproj">
+      <Project>{AC323F51-47D6-46BE-8E06-7A75F4C5348D}</Project>
+      <Name>SymbianWizardLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Libraries\Engine\HeapComparisonLib\HeapComparisonLib.csproj">
+      <Project>{0911ECEE-D330-4DE9-989C-8181604FAAB5}</Project>
+      <Name>HeapComparisonLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Libraries\Engine\HeapLib\HeapLib.csproj">
+      <Project>{D638AB12-FC64-4523-9B99-09F20BC2A791}</Project>
+      <Name>HeapLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Libraries\UI\HeapComparisonUiLib\HeapComparisonUiLib.csproj">
+      <Project>{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}</Project>
+      <Name>HeapComparisonUiLib</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\Libraries\UI\HeapUiLib\HeapUiLib.csproj">
+      <Project>{C53FA050-1FA1-4567-A83B-DADA64DA1464}</Project>
+      <Name>HeapUiLib</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>
+    </PreBuildEvent>
+    <PostBuildEvent>
+    </PostBuildEvent>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/HeapAnalyser.csproj.user	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,57 @@
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <LastOpenVersion>7.10.6030</LastOpenVersion>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ReferencePath>
+    </ReferencePath>
+    <CopyProjectDestinationFolder>
+    </CopyProjectDestinationFolder>
+    <CopyProjectUncPath>
+    </CopyProjectUncPath>
+    <CopyProjectOption>0</CopyProjectOption>
+    <ProjectView>ProjectFiles</ProjectView>
+    <ProjectTrust>0</ProjectTrust>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>C:\Tmp</StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <EnableASPDebugging>false</EnableASPDebugging>
+    <EnableASPXDebugging>false</EnableASPXDebugging>
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+    <EnableSQLServerDebugging>false</EnableSQLServerDebugging>
+    <RemoteDebugEnabled>false</RemoteDebugEnabled>
+    <RemoteDebugMachine>
+    </RemoteDebugMachine>
+    <StartAction>Project</StartAction>
+    <StartArguments>
+    </StartArguments>
+    <StartPage>
+    </StartPage>
+    <StartProgram>
+    </StartProgram>
+    <StartURL>
+    </StartURL>
+    <StartWorkingDirectory>
+    </StartWorkingDirectory>
+    <StartWithIE>true</StartWithIE>
+  </PropertyGroup>
+</Project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/HeapAnalyser.sln	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,355 @@
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeapAnalyser", "HeapAnalyser.csproj", "{20255E8D-09BB-4524-8E10-66B22ACC6662}"
+	ProjectSection(ProjectDependencies) = postProject
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC} = {6054A36B-F8A9-406F-B6CE-B531CC2AEADC}
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{E65371B3-AFBD-4DA3-83F8-06E308AB2172}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{78E96CFB-E406-4A84-BB84-224BEF358CD3}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{F55362FC-260C-486B-96AB-05D12EE672F8}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{C850EBA8-F4E6-4851-925B-D102AC1D1680}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PerfToolsSharedLibraries", "PerfToolsSharedLibraries", "{4E31FB44-3B39-430F-A7E9-00200AE58808}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3rd Party", "3rd Party", "{23FE35A0-E0EB-4879-A5CB-D36B3F702AE7}"
+	ProjectSection(SolutionItems) = preProject
+		..\..\PerfToolsSharedLibraries\3rd Party\XPTable\bin\Debug\XPTable.dll = ..\..\PerfToolsSharedLibraries\3rd Party\XPTable\bin\Debug\XPTable.dll
+		..\..\PerfToolsSharedLibraries\3rd Party\ZedGraph\zedgraph_dll_v5.1.5\ZedGraph.dll = ..\..\PerfToolsSharedLibraries\3rd Party\ZedGraph\zedgraph_dll_v5.1.5\ZedGraph.dll
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{1B120A7D-1C78-47E9-9998-F123A9622ABE}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{DD2914BF-5A7D-4448-850B-C2B43208CDF5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeapComparisonLib", "..\Libraries\Engine\HeapComparisonLib\HeapComparisonLib.csproj", "{0911ECEE-D330-4DE9-989C-8181604FAAB5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeapComparisonUiLib", "..\Libraries\UI\HeapComparisonUiLib\HeapComparisonUiLib.csproj", "{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeapCtrlLib", "..\Libraries\UI\HeapCtrlLib\HeapCtrlLib.csproj", "{4883C5F9-B83E-4262-8389-879AC9E1DF1B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeapUiLib", "..\Libraries\UI\HeapUiLib\HeapUiLib.csproj", "{C53FA050-1FA1-4567-A83B-DADA64DA1464}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianUtils", "..\..\PerfToolsSharedLibraries\Engine\SymbianUtils\SymbianUtils.csproj", "{F6F4CE69-E73A-4917-97ED-B114DE90C92E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianExcelLib", "..\..\PerfToolsSharedLibraries\Engine\SymbianExcelLib\SymbianExcelLib.csproj", "{13A8433A-108C-4EF2-9283-70FC6C549E74}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianParserLib", "..\..\PerfToolsSharedLibraries\Engine\SymbianParserLib\SymbianParserLib.csproj", "{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianStructuresLib", "..\..\PerfToolsSharedLibraries\Engine\SymbianStructuresLib\SymbianStructuresLib.csproj", "{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianZipLib", "..\..\PerfToolsSharedLibraries\Engine\SymbianZipLib\SymbianZipLib.csproj", "{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianDebugLibUi", "..\..\PerfToolsSharedLibraries\UI\SymbianDebugUiLib\SymbianDebugLibUi.csproj", "{6C30B8C1-BF87-4626-8125-D5681B22347C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianUtilsUi", "..\..\PerfToolsSharedLibraries\UI\SymbianUtilsUi\SymbianUtilsUi.csproj", "{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianWizardLib", "..\..\PerfToolsSharedLibraries\UI\SymbianWizardLib\SymbianWizardLib.csproj", "{AC323F51-47D6-46BE-8E06-7A75F4C5348D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Debug Library", "Debug Library", "{DD8DD26E-AA9D-498E-9621-28EB9E210771}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianDebugLib", "..\..\PerfToolsSharedLibraries\Engine\SymbianDebugLib\SymbianDebugLib.csproj", "{796DD82D-9E7D-476D-B700-086CD9A893DA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianXmlInputLib", "..\..\PerfToolsSharedLibraries\Engine\SymbianXmlInputLib\SymbianXmlInputLib.csproj", "{56ECA873-7D1D-45E7-A583-A5388D753321}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianTree", "..\..\PerfToolsSharedLibraries\Engine\SymbianTree\SymbianTree.csproj", "{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DbgEntSymbol", "..\..\PerfToolsSharedLibraries\Engine\SymbianDebugLib\Plugins\DbgEntSymbol\DbgEntSymbol.csproj", "{51C62A41-992E-4158-8A32-228ED49BF71D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SymbianSymbolLib", "..\..\PerfToolsSharedLibraries\Engine\SymbianSymbolLib\SymbianSymbolLib.csproj", "{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeapLib", "..\Libraries\Engine\HeapLib\HeapLib.csproj", "{D638AB12-FC64-4523-9B99-09F20BC2A791}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Symbols", "Symbols", "{03BB2C1B-AE44-429D-AA83-F32A82F71219}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{4C41D55A-5311-4A52-A6A8-32190E511CEA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLPluginMap", "..\..\PerfToolsSharedLibraries\Engine\SymbianSymbolLib\Plugins\SLPluginMap\SLPluginMap.csproj", "{2E619377-8639-49F9-9494-4FAD25CBC05E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLPluginObey", "..\..\PerfToolsSharedLibraries\Engine\SymbianSymbolLib\Plugins\SLPluginObey\SLPluginObey.csproj", "{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLPluginSymbol", "..\..\PerfToolsSharedLibraries\Engine\SymbianSymbolLib\Plugins\SLPluginSymbol\SLPluginSymbol.csproj", "{E921F00D-5F82-454E-9CBE-59381C48781C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SLPluginZip", "..\..\PerfToolsSharedLibraries\Engine\SymbianSymbolLib\Plugins\SLPluginZip\SLPluginZip.csproj", "{BDD4E602-AC36-473A-98D0-FE062213548A}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|Mixed Platforms = Debug|Mixed Platforms
+		Debug|Win32 = Debug|Win32
+		Release|Any CPU = Release|Any CPU
+		Release|Mixed Platforms = Release|Mixed Platforms
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Release|Any CPU.Build.0 = Release|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{20255E8D-09BB-4524-8E10-66B22ACC6662}.Release|Win32.ActiveCfg = Release|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5}.Release|Win32.ActiveCfg = Release|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0}.Release|Win32.ActiveCfg = Release|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B}.Release|Win32.ActiveCfg = Release|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Release|Any CPU.Build.0 = Release|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464}.Release|Win32.ActiveCfg = Release|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E}.Release|Win32.ActiveCfg = Release|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Release|Any CPU.Build.0 = Release|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{13A8433A-108C-4EF2-9283-70FC6C549E74}.Release|Win32.ActiveCfg = Release|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1}.Release|Win32.ActiveCfg = Release|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6}.Release|Win32.ActiveCfg = Release|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Release|Any CPU.Build.0 = Release|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71}.Release|Win32.ActiveCfg = Release|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{6C30B8C1-BF87-4626-8125-D5681B22347C}.Release|Win32.ActiveCfg = Release|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Release|Any CPU.Build.0 = Release|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822}.Release|Win32.ActiveCfg = Release|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D}.Release|Win32.ActiveCfg = Release|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Release|Any CPU.Build.0 = Release|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{796DD82D-9E7D-476D-B700-086CD9A893DA}.Release|Win32.ActiveCfg = Release|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Release|Any CPU.Build.0 = Release|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{56ECA873-7D1D-45E7-A583-A5388D753321}.Release|Win32.ActiveCfg = Release|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8}.Release|Win32.ActiveCfg = Release|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Release|Any CPU.Build.0 = Release|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{51C62A41-992E-4158-8A32-228ED49BF71D}.Release|Win32.ActiveCfg = Release|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Release|Any CPU.Build.0 = Release|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC}.Release|Win32.ActiveCfg = Release|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Release|Any CPU.Build.0 = Release|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{D638AB12-FC64-4523-9B99-09F20BC2A791}.Release|Win32.ActiveCfg = Release|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{2E619377-8639-49F9-9494-4FAD25CBC05E}.Release|Win32.ActiveCfg = Release|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Release|Any CPU.Build.0 = Release|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8}.Release|Win32.ActiveCfg = Release|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{E921F00D-5F82-454E-9CBE-59381C48781C}.Release|Win32.ActiveCfg = Release|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Debug|Win32.ActiveCfg = Debug|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{BDD4E602-AC36-473A-98D0-FE062213548A}.Release|Win32.ActiveCfg = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(NestedProjects) = preSolution
+		{20255E8D-09BB-4524-8E10-66B22ACC6662} = {E65371B3-AFBD-4DA3-83F8-06E308AB2172}
+		{F55362FC-260C-486B-96AB-05D12EE672F8} = {78E96CFB-E406-4A84-BB84-224BEF358CD3}
+		{C850EBA8-F4E6-4851-925B-D102AC1D1680} = {78E96CFB-E406-4A84-BB84-224BEF358CD3}
+		{0911ECEE-D330-4DE9-989C-8181604FAAB5} = {F55362FC-260C-486B-96AB-05D12EE672F8}
+		{D638AB12-FC64-4523-9B99-09F20BC2A791} = {F55362FC-260C-486B-96AB-05D12EE672F8}
+		{6DD1AC1D-22A6-4C7A-BB97-43FCBA9B8BE0} = {C850EBA8-F4E6-4851-925B-D102AC1D1680}
+		{4883C5F9-B83E-4262-8389-879AC9E1DF1B} = {C850EBA8-F4E6-4851-925B-D102AC1D1680}
+		{C53FA050-1FA1-4567-A83B-DADA64DA1464} = {C850EBA8-F4E6-4851-925B-D102AC1D1680}
+		{23FE35A0-E0EB-4879-A5CB-D36B3F702AE7} = {4E31FB44-3B39-430F-A7E9-00200AE58808}
+		{1B120A7D-1C78-47E9-9998-F123A9622ABE} = {4E31FB44-3B39-430F-A7E9-00200AE58808}
+		{DD2914BF-5A7D-4448-850B-C2B43208CDF5} = {4E31FB44-3B39-430F-A7E9-00200AE58808}
+		{6C30B8C1-BF87-4626-8125-D5681B22347C} = {1B120A7D-1C78-47E9-9998-F123A9622ABE}
+		{48F86FA3-3B42-4826-8D06-E8F2E0E7B822} = {1B120A7D-1C78-47E9-9998-F123A9622ABE}
+		{AC323F51-47D6-46BE-8E06-7A75F4C5348D} = {1B120A7D-1C78-47E9-9998-F123A9622ABE}
+		{4C41D55A-5311-4A52-A6A8-32190E511CEA} = {DD2914BF-5A7D-4448-850B-C2B43208CDF5}
+		{DD8DD26E-AA9D-498E-9621-28EB9E210771} = {DD2914BF-5A7D-4448-850B-C2B43208CDF5}
+		{03BB2C1B-AE44-429D-AA83-F32A82F71219} = {DD2914BF-5A7D-4448-850B-C2B43208CDF5}
+		{13A8433A-108C-4EF2-9283-70FC6C549E74} = {4C41D55A-5311-4A52-A6A8-32190E511CEA}
+		{925A4DB0-85BD-4157-933F-5BFB93FB4DA1} = {4C41D55A-5311-4A52-A6A8-32190E511CEA}
+		{D3BDEB23-43DA-4534-986B-F6B3DD05EBF6} = {4C41D55A-5311-4A52-A6A8-32190E511CEA}
+		{0B246F3F-62D3-4732-86D2-3EC1F3ADBD71} = {4C41D55A-5311-4A52-A6A8-32190E511CEA}
+		{56ECA873-7D1D-45E7-A583-A5388D753321} = {4C41D55A-5311-4A52-A6A8-32190E511CEA}
+		{2BE440C1-E5F6-4F5D-B533-0F745CAA65A8} = {4C41D55A-5311-4A52-A6A8-32190E511CEA}
+		{F6F4CE69-E73A-4917-97ED-B114DE90C92E} = {4C41D55A-5311-4A52-A6A8-32190E511CEA}
+		{796DD82D-9E7D-476D-B700-086CD9A893DA} = {DD8DD26E-AA9D-498E-9621-28EB9E210771}
+		{51C62A41-992E-4158-8A32-228ED49BF71D} = {DD8DD26E-AA9D-498E-9621-28EB9E210771}
+		{6054A36B-F8A9-406F-B6CE-B531CC2AEADC} = {03BB2C1B-AE44-429D-AA83-F32A82F71219}
+		{2E619377-8639-49F9-9494-4FAD25CBC05E} = {03BB2C1B-AE44-429D-AA83-F32A82F71219}
+		{4C6F0ECF-A5DC-47D0-BB11-F06E1C86A6C8} = {03BB2C1B-AE44-429D-AA83-F32A82F71219}
+		{E921F00D-5F82-454E-9CBE-59381C48781C} = {03BB2C1B-AE44-429D-AA83-F32A82F71219}
+		{BDD4E602-AC36-473A-98D0-FE062213548A} = {03BB2C1B-AE44-429D-AA83-F32A82F71219}
+	EndGlobalSection
+EndGlobal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Console/Files/HACmdLineFSEntity.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections.Generic;
+
+namespace HeapAnalyser.UIs.Console.Files
+{
+    internal class HACmdLineFSEntity
+	{
+        #region Constructors & destructor
+        public HACmdLineFSEntity()
+		{
+		}
+        #endregion
+
+		#region API
+        #endregion
+
+		#region Properties
+        public FileInfo File
+        {
+            get { return iFile; }
+            set { iFile = value; }
+        }
+
+        public DirectoryInfo Directory
+        {
+            get { return iDirectory; }
+            set { iDirectory = value; }
+        }
+
+        public bool IsFile
+        {
+            get { return ( iFile != null ); }
+        }
+
+        public bool IsDirectory
+        {
+            get { return ( iDirectory != null); }
+        }
+
+        public string Name
+        {
+            get
+            {
+                StringBuilder ret = new StringBuilder();
+                //
+                if ( IsDirectory )
+                {
+                    ret.Append( Directory.FullName );
+                }
+                else if ( IsFile )
+                {
+                    ret.Append( File.FullName );
+                }
+                //
+                return ret.ToString(); 
+            }
+        }
+
+        public bool Exists
+        {
+            get
+            {
+                bool ret = false;
+                //
+                if ( IsDirectory )
+                {
+                    ret = Directory.Exists;
+                }
+                else if ( IsFile )
+                {
+                    ret = File.Exists;
+                }
+                //
+                return ret;
+            }
+        }
+        
+        public object Tag
+        {
+            get { return iTag; }
+            set { iTag = value; }
+        }
+        #endregion
+
+        #region Operators
+        public static implicit operator FileInfo( HACmdLineFSEntity aFile )
+        {
+            return aFile.iFile;
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region From System.Object
+        public override string ToString()
+        {
+            return Name;
+        }
+        #endregion
+
+        #region Member data
+        private object iTag = null;
+        private FileInfo iFile = null;
+        private DirectoryInfo iDirectory = null;
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Console/Files/HACmdLineFSEntityList.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections.Generic;
+
+namespace HeapAnalyser.UIs.Console.Files
+{
+    internal class HACmdLineFSEntityList<T> : IEnumerable<T> where T : HACmdLineFSEntity, new()
+	{
+        #region Constructors & destructor
+        public HACmdLineFSEntityList()
+		{
+		}
+        #endregion
+
+		#region API
+        public void Add( FileInfo aFile )
+        {
+            T entry = new T();
+            entry.File = aFile;
+            iFiles.Add( entry );
+        }
+
+        public void Add( DirectoryInfo aDir )
+        {
+            T entry = new T();
+            entry.Directory = aDir;
+            iFiles.Add( entry );
+        }
+
+        public void AddRange( FileInfo[] aFiles )
+        {
+            foreach ( FileInfo file in aFiles )
+            {
+                Add( file );
+            }
+        }
+
+        public bool Contains( string aFileName )
+        {
+            HACmdLineFSEntity ret = this[ aFileName ]; 
+            return ret != null;
+        }
+        #endregion
+
+		#region Properties
+        public int Count
+        {
+            get { return iFiles.Count; }
+        }
+
+        public T this[ int aIndex ]
+        {
+            get { return iFiles[ aIndex ]; }
+        }
+
+        public T this[ string aFileName ]
+        {
+            get
+            {
+                T ret = iFiles.Find(
+                   delegate( T file )
+                   {
+                       return file.Name.ToUpper() == aFileName.ToUpper();
+                   }
+                );
+                return ret;
+            }
+        }
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Operators
+        public static implicit operator string[]( HACmdLineFSEntityList<T> aList )
+        {
+            List<string> ret = new List<string>();
+            foreach ( T file in aList )
+            {
+                ret.Add( file.Name );
+            }
+            return ret.ToArray();
+        }
+        #endregion
+
+        #region IEnumerable<T> Members
+        public IEnumerator<T> GetEnumerator()
+        {
+            foreach ( T file in iFiles )
+            {
+                yield return file;
+            }
+        }
+
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
+        {
+            IEnumerator<T> self = (IEnumerator<T>) this;
+            System.Collections.IEnumerator ret = (System.Collections.IEnumerator) self;
+            return ret;
+        }
+        #endregion
+
+        #region Member data
+        private List<T> iFiles = new List<T>();
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Console/Files/HACmdLineFileSource.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections.Generic;
+
+namespace HeapAnalyser.UIs.Console.Files
+{
+    internal class HACmdLineFileSource : HACmdLineFSEntity
+    {
+        #region Constructors & destructor
+        public HACmdLineFileSource()
+		{
+		}
+        #endregion
+
+		#region API
+        #endregion
+
+		#region Properties
+        #endregion
+
+        #region Internal methods
+        #endregion
+
+        #region Output class
+        #endregion
+
+        #region Member data
+        #endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Console/HAUIConsole.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,384 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Xml;
+using System.Collections.Generic;
+using System.Windows.Forms;
+using SymbianUtils;
+using SymbianUtils.Settings;
+using SymbianUtils.Tracer;
+using SymbianUtils.FileSystem.Utilities;
+using SymbianXmlInputLib.Parser;
+using SymbianXmlInputLib.Parser.Nodes;
+using SymbianXmlInputLib.Elements;
+using SymbianXmlInputLib.Elements.Types.Category;
+using SymbianXmlInputLib.Elements.Types.FileSystem;
+using SymbianXmlInputLib.Elements.Types.Command;
+using SymbianDebugLib.Engine;
+using SymbianDebugLib.Entity;
+using SymbianStructuresLib.CodeSegments;
+using HeapLib;
+using HeapLib.Reconstructor;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.DataSources.Analyser;
+using HeapUiLib.Dialogs;
+using HeapUiLib.Forms;
+using HeapAnalyser.Engine;
+using HeapAnalyser.Engine.Types;
+using HeapAnalyser.Exceptions;
+using HeapComparisonUiLib.Progress;
+using HeapAnalyser.UIs.Console.Files;
+using HeapAnalyser.UIs.Console.Inputs;
+
+namespace HeapAnalyser.UIs.Console
+{
+	public class HAUIConsole : HAUI
+	{
+		#region Constructors
+        public HAUIConsole( string[] aArgs, XmlSettings aSettings, HeapWizardEngine aEngine, ITracer aTracer )
+            : base( aArgs, aSettings, aEngine, aTracer )
+		{
+            iInputs = new HACmdLineInputParameters( this, aEngine );
+		}
+		#endregion
+
+        #region From HAUI
+        public override bool IsAppropriateUI
+        {
+            get
+            { 
+                // There must be command line arguments in order to use the command line UI
+                bool ret = base.Args.Length != 0;
+                //
+                if ( ret )
+                {
+                    string[] args = base.Args;
+                    for ( int i = 0; i < args.Length; i++ )
+                    {
+                        string cmd = args[ i ].Trim().ToUpper();
+                        string nextArg = ( i < args.Length - 1 ? args[ i + 1 ].Trim().ToUpper() : string.Empty );
+                        //
+                        try
+                        {
+                            if ( cmd == KPluginInputParameter && nextArg != string.Empty )
+                            {
+                                ret = true;
+                                break;
+                            }
+                        }
+                        catch ( Exception )
+                        {
+                        }
+                    }
+                }
+                //
+                return ret;
+            }
+        }
+
+        public override Form PrepareInitialForm()
+        {
+            Form formToShow = null;
+            //
+            ParseInputs();
+            PrimeDebugEngine();
+            
+            // If we're running the graphical UI then show the main analysis form,
+            // otherwise just run the comparison operation and exit.
+            switch ( base.Engine.OperationType )
+            {
+            case HeapWizardEngine.TOperationType.EOperationTypeAnalyseAndView:
+                formToShow = RunAnalyser();
+                break;
+            case HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps:
+                RunComparison();
+                break;
+            }
+
+            return formToShow;
+        }
+
+        public override Form HandleFormClosed( object aSender, EventArgs aArgs )
+        {
+            Form ret = null;
+            return ret;
+        }
+        #endregion
+
+		#region Properties
+		#endregion
+
+        #region Event handlers
+        private void DbgEngine_EntityPrimingStarted( DbgEngine aEngine, DbgEntity aEntity, object aContext )
+        {
+            Trace( "[HA Cmd] Priming debug meta-data: " + aEntity.FullName );
+        }
+
+        private void DbgEngine_EntityPrimingProgress( DbgEngine aEngine, DbgEntity aEntity, object aContext )
+        {
+            if ( aContext != null )
+            {
+                if ( aContext.GetType() == typeof( int ) )
+                {
+                    int value = (int) aContext;
+                    Trace( "[HA Cmd] Priming debug meta-data progress: {0:d3}% {1}", value, aEntity.FullName );
+                }
+            }
+        }
+
+        private void DbgEngine_EntityPrimingComplete( DbgEngine aEngine, DbgEntity aEntity, object aContext )
+        {
+            Trace( "[HA Cmd] Primed debug meta-data: " + aEntity.FullName );
+        }
+
+        private void SymbolLibCodeSegDefinitionResolver_LocatedFile( string aFileName )
+        {
+            Trace( "[HA Cmd] Located debug meta data: " + aFileName );
+        }
+        #endregion
+
+        #region Internal constants
+        private const string KPluginInputParameter = "-INPUT";
+        #endregion
+
+		#region Internal methods
+        private void ParseInputs()
+        {
+            Trace( "[HA Cmd] ParseInputs() - START " );
+            Trace( string.Empty );
+            Trace( "[HA Cmd] command line: " + System.Environment.CommandLine );
+            Trace( "[HA Cmd] command wd:   " + System.Environment.CurrentDirectory );
+            Trace( "[HA Cmd] proc count:   " + System.Environment.ProcessorCount );
+            Trace( "[HA Cmd] sysdir:       " + System.Environment.SystemDirectory );
+            Trace( "[HA Cmd] version:      " + System.Environment.Version.ToString() );
+            Trace( string.Empty );
+
+            // We expect to see an "-input" parameter
+            string inputFileName = ExtractCommandLineInputParameter( Args );
+
+            // If no file was found then inputFileName will be an empty string.
+            if ( string.IsNullOrEmpty( inputFileName ) )
+            {
+                throw new HAUIException( "Input file parameter missing", HAUIException.KErrCommandLineArgumentsMissing );
+            }
+            else if ( !FSUtilities.Exists( inputFileName ) )
+            {
+                throw new HAUIException( "Input file not found", HAUIException.KErrCommandLineArgumentsFileNotFound );
+            }
+            else
+            {
+                Trace( "[HA Cmd] ParseInputs() - start read inputs" );
+                iInputs.Read( inputFileName );
+                Trace( "[HA Cmd] ParseInputs() - inputs read successfully" );
+
+                // Validate the inputs are correct.
+                if ( string.IsNullOrEmpty( iInputs.ThreadName ) )
+                {
+                    throw new HAUIException( "The specified thread name is invalid", HAUIException.KErrCommandLineAnalysisThreadNameInvalid );
+                }
+                else 
+                {
+                    // Validate input data
+                    int sourceCount = iInputs.SourceFiles.Count;
+                    switch( base.Engine.OperationType )
+                    {
+                    case HeapWizardEngine.TOperationType.EOperationTypeAnalyseAndView:
+                        if ( iInputs.SourceFiles.Count != 1 && iInputs.SourceFiles[ 0 ].IsFile )
+                        {
+                            Trace( "[HA Cmd] ParseInputs() - viewer - missing source file!" );
+                            throw new HAUIException( "Source file not specified", HAUIException.KErrCommandLineSourceFileNotFound );
+                        }
+                        break;
+                    case HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps:
+                        if ( iInputs.SourceFiles.Count != 2 && iInputs.SourceFiles[ 0 ].IsFile && iInputs.SourceFiles[ 1 ].IsFile )
+                        {
+                            Trace( "[HA Cmd] ParseInputs() - comparison - missing source files!" );
+                            throw new HAUIException( "Source files not specified", HAUIException.KErrCommandLineSourceFileNotFound );
+                        }
+                        break;
+                    }
+
+                    // Validate output (where needed)
+                    if ( base.Engine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps )
+                    {
+                        bool outputSet = iInputs.OutputFile != null;
+                        if ( !outputSet )
+                        {
+                            throw new HAUIException( "Output file not specified", HAUIException.KErrCommandLineAnalysisOutputInvalid );
+                        }
+                    }
+                }
+            }
+
+            Trace( "[HA Cmd] ParseInputs() - END" );
+        }
+
+        private void PrimeDebugEngine()
+        {
+            DbgEngine debugEngine = base.Engine.DebugEngine;
+            //
+            Exception primerException = null;
+            HACmdLineFSEntityList<HACmdLineFSEntity> metaDataFiles = iInputs.MetaDataFiles;
+            //
+            try
+            {
+                debugEngine.Clear();
+
+                foreach ( HACmdLineFSEntity entry in metaDataFiles )
+                {
+                    Trace( "[HA Cmd] Seeding debug meta engine with entry: " + entry.Name );
+                    DbgEntity entity = debugEngine.Add( entry.Name );
+                    if ( entity != null )
+                    {
+                        Trace( "[HA Cmd] Entry type detected as: [" + entity.CategoryName + "]" );
+                        entity.Tag = entry;
+                    }
+                    else
+                    {
+                        Trace( "[HA Cmd] Entry not handled: " + entry.Name );
+                    }
+                }
+
+                // Listen to prime events
+                try
+                {
+                    Trace( "[HA Cmd] Starting prime operation... " );
+                    debugEngine.EntityPrimingStarted += new DbgEngine.EventHandler( DbgEngine_EntityPrimingStarted );
+                    debugEngine.EntityPrimingProgress += new DbgEngine.EventHandler( DbgEngine_EntityPrimingProgress );
+                    debugEngine.EntityPrimingComplete += new DbgEngine.EventHandler( DbgEngine_EntityPrimingComplete );
+                    debugEngine.Prime( TSynchronicity.EAsynchronous );
+                    Trace( "[HA Cmd] Debug meta data priming completed successfully." );
+                }
+                finally
+                {
+                    debugEngine.EntityPrimingStarted -= new DbgEngine.EventHandler( DbgEngine_EntityPrimingStarted );
+                    debugEngine.EntityPrimingProgress -= new DbgEngine.EventHandler( DbgEngine_EntityPrimingProgress );
+                    debugEngine.EntityPrimingComplete -= new DbgEngine.EventHandler( DbgEngine_EntityPrimingComplete );
+                }
+            }
+            catch ( Exception exception )
+            {
+                Trace( "[HA Cmd] Debug meta data priming exception: " + exception.Message + ", " + exception.StackTrace );
+                primerException = exception;
+            }
+        }
+
+        private Form RunAnalyser()
+        {
+            string file = iInputs.SourceFiles[ 0 ].File.FullName;
+            base.Engine.AnalysisEngine.DataSource = PrepareDataSource( file );
+            base.Engine.AnalysisEngine.CreateParser();
+            //
+            Form ret = new HeapViewerForm( base.Engine.AnalysisEngine.Reconstructor, base.Settings );
+            return ret;
+        }
+
+        private void RunComparison()
+        {
+            // Does the output file already exist? If so, try to delete it.
+            // If not, then carry on.
+            if ( iInputs.OutputFile.File.Exists )
+            {
+                // If deletion fails then return an error by way of heap analyser exception.
+                try
+                {
+                    iInputs.OutputFile.File.Delete();
+                }
+                catch ( Exception )
+                {
+                    throw new HAUIException( "Could not overwrite output file", HAUIException.KErrCommandLineAnalysisOutputInvalid );
+                }
+            }
+
+            ComparisonEngineHeapData comparisonEngine = base.Engine.ComparisonEngineData;
+            //
+            string file1 = iInputs.SourceFiles[ 0 ].File.FullName;
+            comparisonEngine.DataSource1 = PrepareDataSource( file1 );
+            //
+            string file2 = iInputs.SourceFiles[ 1 ].File.FullName;
+            comparisonEngine.DataSource2 = PrepareDataSource( file2 );
+            //
+            comparisonEngine.OutputFileName = iInputs.OutputFile.File.FullName;
+            base.Engine.ComparisonEngineData.CreateReconstructors();
+            ComparisonProgressDialogData.Compare( comparisonEngine.Reconstructor1,
+                                                  comparisonEngine.Reconstructor2,
+                                                  comparisonEngine.OutputFileName );
+
+        }
+
+        private DataSource PrepareDataSource( string aFileName )
+        {
+            DataSourceAnalyser analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse( aFileName );
+            DataSourceCollection sources = analyser.DataSources;
+            DataSource source = sources[ iInputs.ThreadName ];
+            if ( source == null )
+            {
+                throw new HAUIException( "Thread was not found in source data", HAUIException.KErrCommandLineAnalysisThreadNameInvalid );
+            }
+            //
+            return source;
+        }
+
+        private static string ExtractCommandLineInputParameter( string[] aArgs )
+        {
+            string ret = string.Empty;
+
+            // -input d:\ca_fullsummary.xml
+            for ( int i = 0; i < aArgs.Length; i++ )
+            {
+                string cmd = aArgs[ i ].Trim().ToUpper();
+                string nextArg = ( i < aArgs.Length - 1 ? aArgs[ i + 1 ].Trim().ToUpper() : string.Empty );
+                //
+                if ( cmd == KPluginInputParameter && nextArg != string.Empty )
+                {
+                    ret = nextArg;
+                }
+            }
+
+            return ret;
+        }
+        #endregion
+
+		#region Data members
+        private readonly HACmdLineInputParameters iInputs;
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Console/Inputs/HACmdLineInputParameters.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,304 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.Text;
+using System.IO;
+using System.Collections.Generic;
+using SymbianUtils.Tracer;
+using SymbianUtils.FileSystem.Utilities;
+using SymbianXmlInputLib.Parser;
+using SymbianXmlInputLib.Parser.Nodes;
+using SymbianXmlInputLib.Elements;
+using SymbianXmlInputLib.Elements.Types.Category;
+using SymbianXmlInputLib.Elements.Types.Extension;
+using SymbianXmlInputLib.Elements.Types.FileSystem;
+using SymbianXmlInputLib.Elements.Types.Command;
+using HeapAnalyser.UIs.Console.Files;
+using HeapAnalyser.Exceptions;
+using HeapAnalyser.Engine;
+
+namespace HeapAnalyser.UIs.Console.Inputs
+{
+	internal class HACmdLineInputParameters
+    {
+        #region Constructors & destructor
+        public HACmdLineInputParameters( ITracer aTracer, HeapWizardEngine aEngine )
+		{
+            iEngine = aEngine;
+            iTracer = aTracer;
+		}
+		#endregion
+
+		#region API
+        public void Read( string aFileName )
+        {
+            Trace( "[CmdInput] Read() - aFileName: " + aFileName );
+            try
+            {
+                // First create the tree
+                SXILDocument doc = CreateDocumentTree( aFileName );
+
+                // Then convert it to the list of elements that we care about
+                ExtractData( doc );
+            }
+            catch ( HAUIException cmdLineException )
+            {
+                Trace( "[CmdInput] Read() - HAUIException: " + cmdLineException.Message + " " + cmdLineException.StackTrace );
+                throw cmdLineException;
+            }
+            catch ( Exception generalException )
+            {
+                Trace( "[CmdInput] Read() - generalException: " + generalException.Message + " " + generalException.StackTrace );
+                throw new HAUIException( "Error reading input xml file", generalException, HAUIException.KErrCommandLineArgumentsFileInvalid );
+            }
+            Trace( "[CmdInput] Read() - read OK: " + aFileName );
+        }
+        #endregion
+
+		#region Properties
+        public string ThreadName
+        {
+            get { return iThreadName; }
+        }
+
+        public HACmdLineFSEntity OutputFile
+        {
+            get { return iOutputFile; }
+        }
+
+        public HACmdLineFSEntityList<HACmdLineFileSource> SourceFiles
+        {
+            get { return iSources; }
+        }
+
+        public HACmdLineFSEntityList<HACmdLineFSEntity> MetaDataFiles
+        {
+            get { return iMetaData; }
+        }
+        #endregion
+
+        #region Internal constants
+        private const string KInputFileDocumentRootNode = "heap_analysis";
+        private const string KInputFileCategorySource = "source";
+        private const string KInputFileCategoryDebugMetaData = "debug_meta_data";
+        private const string KInputFileCategoryParameters = "parameters";
+        private const string KInputFileCategoryOutput = "output";
+        private const string KInputFileCommandThread = "thread";
+        private const string KInputFileCommandNameAnalysis = "analysis_type";
+        private const string KInputFileCommandNameAnalysisViewer = "VIEWER";
+        private const string KInputFileCommandNameAnalysisCompareTwoHeaps = "COMPARETWOHEAPS";
+        #endregion
+
+        #region Internal methods
+        private SXILDocument CreateDocumentTree( string aFileName )
+        {
+            SXILDocument doc = new SXILDocument();
+
+            // Read input file into document
+            using ( SXILParser parser = new SXILParser( aFileName, KInputFileDocumentRootNode, doc ) )
+            {
+                parser.CategoryAdd( KInputFileCategorySource, new SXILParserNodeFileSystem() );
+                parser.CategoryAdd( KInputFileCategoryDebugMetaData, new SXILParserNodeFileSystem() );
+                parser.CategoryAdd( KInputFileCategoryParameters,
+                    new SXILParserNodeCommand( KInputFileCommandNameAnalysis ),
+                    new SXILParserNodeCommand( KInputFileCommandThread )
+                    );
+                parser.CategoryAdd( KInputFileCategoryOutput, new SXILParserNodeFileSystem() );
+                parser.Parse();
+            }
+
+            return doc;
+        }
+
+        private void ExtractData( SXILDocument aDocument )
+        {
+            foreach ( SXILElement element in aDocument )
+            {
+                if ( element is SXILElementCategory )
+                {
+                    SXILElementCategory category = (SXILElementCategory) element;
+                    string name = category.Name.ToLower();
+                    //
+                    switch ( name )
+                    {
+                    case KInputFileCategorySource:
+                        ExtractFileList<HACmdLineFileSource>( iSources, category, true );
+                        break;
+                    case KInputFileCategoryDebugMetaData:
+                        ExtractFileList<HACmdLineFSEntity>( iMetaData, category, false );
+                        break;
+                    case KInputFileCategoryParameters:
+                        ExtractParameters( category );
+                        break;
+                    case KInputFileCategoryOutput:
+                        ExtractOutput( category );
+                        break;
+                    }
+                }
+            }
+
+            // We don't require debug meta data if performing a summary operation. Otherwise, we do.
+            if ( iMetaData.Count == 0 )
+            {
+                Trace( "[CmdInput] ExtractData() - no debug meta data supplied!" );
+                throw new HAUIException( "Debug meta-data not present", HAUIException.KErrCommandLineDebugMetaDataMissing );
+            }
+        
+        }
+
+        private void ExtractFileList<T>( HACmdLineFSEntityList<T> aList, SXILElementCategory aCategory, bool aExpandDirectoriesToUnderlyingFiles ) where T : HACmdLineFSEntity, new()
+        {
+            foreach ( SXILElement element in aCategory )
+            {
+                if ( element is SXILElementFile )
+                {
+                    SXILElementFile file = (SXILElementFile) element;
+                    Trace( "[CmdInput] ExtractFileList() - file: " + file );
+                    if ( !file.Exists )
+                    {
+                        throw new FileNotFoundException( "File not found", file.Name );
+                    }
+                    //
+                    aList.Add( file );
+                }
+                else if ( element is SXILElementDirectory )
+                {
+                    SXILElementDirectory dir = (SXILElementDirectory) element;
+                    Trace( "[CmdInput] ExtractFileList() - dir:  " + dir );
+                    if ( !dir.Exists )
+                    {
+                        throw new DirectoryNotFoundException( "Directory not found: " + dir.Name );
+                    }
+                    //
+                    if ( aExpandDirectoriesToUnderlyingFiles )
+                    {
+                        aList.AddRange( dir.Files );
+                    }
+                    else
+                    {
+                        aList.Add( dir.Directory );
+                    }
+                }
+            }
+        }
+
+        private void ExtractParameters( SXILElementCategory aCategory )
+        {
+            foreach ( SXILElement element in aCategory )
+            {
+                if ( element is SXILElementCommand )
+                {
+                    SXILElementCommand entry = (SXILElementCommand) element;
+                    //
+                    string type = entry.Details.Trim();
+                    if ( entry.Name == KInputFileCommandNameAnalysis )
+                    {
+                        Trace( "[CmdInput] ExtractFileList() - command: " + type );
+                        switch ( type.ToUpper() )
+                        {
+                        case KInputFileCommandNameAnalysisViewer:
+                            iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeAnalyseAndView;
+                            break;
+                        case KInputFileCommandNameAnalysisCompareTwoHeaps:
+                            iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps;
+                            break;
+                        default:
+                            throw new HAUIException( "Unsupported analysis type", HAUIException.KErrCommandLineAnalysisTypeNotSupported );
+                        }
+                    }
+                    else if ( entry.Name == KInputFileCommandThread )
+                    {
+                        iThreadName = type;
+                    }
+                    else
+                    {
+                        throw new HAUIException( "Unsupported command: " + entry.Name, HAUIException.KErrCommandLineInvalidCommand );
+                    }
+                }
+            }
+        }
+
+        private void ExtractOutput( SXILElementCategory aCategory )
+        {
+            // We either output to file or directory - if both are present then bail out
+            iOutputFile = null;
+            //
+            foreach ( SXILElement element in aCategory )
+            {
+                if ( element is SXILElementFile )
+                {
+                    if ( iOutputFile != null )
+                    {
+                        throw new HAUIException( "Output specified twice", HAUIException.KErrCommandLineAnalysisOutputInvalid );
+                    }
+                    else
+                    {
+                        SXILElementFile file = (SXILElementFile) element;
+                        iOutputFile = new HACmdLineFSEntity();
+                        iOutputFile.File = new FileInfo( file.Name );
+                    }
+                }
+                else if ( element is SXILElementDirectory )
+                {
+                    throw new HAUIException( "Cannot output directory", HAUIException.KErrCommandLineAnalysisOutputInvalid );
+                }
+            }
+        }
+
+        public void Trace( string aMessage )
+        {
+            iTracer.Trace( aMessage );
+        }
+
+        public void Trace( string aFormat, params object[] aParams )
+        {
+            string text = string.Format( aFormat, aParams );
+            Trace( text );
+        }
+        #endregion
+
+        #region Data members
+        private readonly ITracer iTracer;
+        private readonly HeapWizardEngine iEngine;
+        private string iThreadName = string.Empty;
+        private HACmdLineFSEntity iOutputFile = null;
+        private HACmdLineFSEntityList<HACmdLineFSEntity> iMetaData = new HACmdLineFSEntityList<HACmdLineFSEntity>();
+        private HACmdLineFSEntityList<HACmdLineFileSource> iSources = new HACmdLineFSEntityList<HACmdLineFileSource>();
+        #endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Graphical/HAUIGraphical.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+using System.Text;
+using SymbianUtils.Tracer;
+using SymbianUtils.Settings;
+using SymbianUtils.FileSystem.Utilities;
+using SymbianUtilsUi.Dialogs;
+using HeapLib;
+using HeapUiLib.Forms;
+using HeapAnalyser.Engine;
+using HeapAnalyser.Engine.Types;
+using HeapAnalyser.UIs.Graphical.Wizard;
+using HeapComparisonUiLib.Progress;
+
+namespace HeapAnalyser.UIs.Graphical
+{
+	public class HAUIGraphical : HAUI
+	{
+		#region Constructors
+        public HAUIGraphical( string[] aArgs, XmlSettings aSettings, HeapWizardEngine aEngine, ITracer aTracer )
+            : base( aArgs, aSettings, aEngine, aTracer )
+		{
+		}
+		#endregion
+
+		#region From HAUI
+        public override bool IsAppropriateUI
+        {
+            get 
+            { 
+                // There should be no command line arguments when using the graphical UI
+                return base.Args.Length == 0; 
+            }
+        }
+
+        public override Form PrepareInitialForm()
+        {
+            iWizard = new HASetupWizard( base.Settings, base.Engine );
+            return iWizard;
+        }
+
+        public override Form HandleFormClosed( object aSender, EventArgs aArgs )
+        {
+            Form ret = null;
+            //
+            if ( aSender is HASetupWizard )
+            {
+                // Check if the wizard finished successfully...
+                string result = base.Settings[ "Wizard", "DialogResult" ];
+                if ( result == DialogResult.OK.ToString() )
+                {
+                    // Decide which form to show next
+                    if ( base.Engine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeAnalyseAndView )
+                    {
+                        base.Engine.AnalysisEngine.CreateParser();
+                        //
+                        iAnalysisViewerForm = new HeapViewerForm( base.Engine.AnalysisEngine.Reconstructor, base.Settings );
+                        ret = this.iAnalysisViewerForm;
+                    }
+                    else if ( base.Engine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps )
+                    {
+                        // NB: Shows progress dialog immediately
+                        base.Engine.ComparisonEngineData.CreateReconstructors();
+                        ComparisonProgressDialogData.Compare( base.Engine.ComparisonEngineData.Reconstructor1,
+                                                              base.Engine.ComparisonEngineData.Reconstructor2,
+                                                              base.Engine.ComparisonEngineData.OutputFileName );
+                    }
+                    else if ( base.Engine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapCSV )
+                    {
+                        // NB: Shows progress dialog immediately
+                        ComparisonProgressDialogCSV.Compare( base.Engine.ComparisonEngineCSV.SourceFileNames, base.Engine.ComparisonEngineCSV.OutputDirectory );
+                    }
+                }
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+		#region Data members
+        private HASetupWizard iWizard = null;
+		private HeapViewerForm iAnalysisViewerForm = null;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Graphical/Wizard/HASetupWizard.Designer.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,775 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+namespace HeapAnalyser.UIs.Graphical.Wizard
+{
+    partial class HASetupWizard
+    {
+        // <summary>
+        // Required designer variable.
+        // </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        // <summary>
+        // Clean up any resources being used.
+        // </summary>
+        // <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose( bool disposing )
+        {
+            if ( disposing && ( components != null ) )
+            {
+                components.Dispose();
+            }
+            base.Dispose( disposing );
+        }
+
+        #region Windows Form Designer generated code
+
+        // <summary>
+        // Required method for Designer support - do not modify
+        // the contents of this method with the code editor.
+        // </summary>
+        private void InitializeComponent()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HASetupWizard));
+            this.iWizard = new SymbianWizardLib.GUI.SymWizard();
+            this.iPG_OpType = new SymbianWizardLib.GUI.SymWizardPage();
+            this.iPG1_OpType_GroupBox = new System.Windows.Forms.GroupBox();
+            this.iPG1_OpType_FLP = new System.Windows.Forms.FlowLayoutPanel();
+            this.iPG1_RB_OpType_HeapViewer = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_OpType_CompareHeapDump = new System.Windows.Forms.RadioButton();
+            this.iPG1_RB_OpType_CompareCSV = new System.Windows.Forms.RadioButton();
+            this.iLbl_Version = new System.Windows.Forms.Label();
+            this.header4 = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_SourceData_Log = new SymbianWizardLib.GUI.SymWizardPage();
+            this.groupBox7 = new System.Windows.Forms.GroupBox();
+            this.iPG_SourceData_Log_FB = new SymbianUtilsUi.Controls.SymbianFileBrowserControl();
+            this.header5 = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_SourceData_CompareCSV = new SymbianWizardLib.GUI.SymWizardPage();
+            this.iPG_SourceData_CompareCSV_Files = new SymbianUtilsUi.Controls.SymbianFileListManagementControl();
+            this.symWizardHeaderSection1 = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_SourceData_CompareHeapData = new SymbianWizardLib.GUI.SymWizardPage();
+            this.iPG_SourceData_CompareHeapData_GP_Log2 = new System.Windows.Forms.GroupBox();
+            this.iPG202_Combo_ThreadName2 = new System.Windows.Forms.ComboBox();
+            this.iPG202_TB_LogFile2 = new SymbianUtilsUi.Controls.SymbianFileBrowserControl();
+            this.label3 = new System.Windows.Forms.Label();
+            this.iPG_SourceData_CompareHeapData_GP_Log1 = new System.Windows.Forms.GroupBox();
+            this.iPG202_Combo_ThreadName1 = new System.Windows.Forms.ComboBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.iPG202_TB_LogFile1 = new SymbianUtilsUi.Controls.SymbianFileBrowserControl();
+            this.header3 = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_Cmn_Symbolics = new SymbianWizardLib.GUI.SymWizardPage();
+            this.iPG301_DebugControl = new SymbianDebugLibUi.Controls.DebugEngineControl();
+            this.header7 = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_Cmn_Filters = new SymbianWizardLib.GUI.SymWizardPage();
+            this.groupBox20 = new System.Windows.Forms.GroupBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.iPG302_Combo_Filter = new System.Windows.Forms.ComboBox();
+            this.label41 = new System.Windows.Forms.Label();
+            this.header6 = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_OutputToFile = new SymbianWizardLib.GUI.SymWizardPage();
+            this.groupBox8 = new System.Windows.Forms.GroupBox();
+            this.iPG_OutputToFile_FB = new SymbianUtilsUi.Controls.SymbianFileSaveAsControl();
+            this.iHeader_OutputToFile = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_OutputToDirectory = new SymbianWizardLib.GUI.SymWizardPage();
+            this.groupBox9 = new System.Windows.Forms.GroupBox();
+            this.iPG_OutputToDirectory_FB = new SymbianUtilsUi.Controls.SymbianFolderBrowserControl();
+            this.iHeader_OutputToDirectory = new SymbianWizardLib.GUI.SymWizardHeaderSection();
+            this.iPG_Final = new SymbianWizardLib.GUI.SymWizardPage();
+            this.iPG5000_InfoControl = new SymbianWizardLib.GUI.SymWizardInfoControl();
+            this.label1 = new System.Windows.Forms.Label();
+            this.iErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
+            this.iPG_OpType.SuspendLayout();
+            this.iPG1_OpType_GroupBox.SuspendLayout();
+            this.iPG1_OpType_FLP.SuspendLayout();
+            this.iPG_SourceData_Log.SuspendLayout();
+            this.groupBox7.SuspendLayout();
+            this.iPG_SourceData_CompareCSV.SuspendLayout();
+            this.iPG_SourceData_CompareHeapData.SuspendLayout();
+            this.iPG_SourceData_CompareHeapData_GP_Log2.SuspendLayout();
+            this.iPG_SourceData_CompareHeapData_GP_Log1.SuspendLayout();
+            this.iPG_Cmn_Symbolics.SuspendLayout();
+            this.iPG_Cmn_Filters.SuspendLayout();
+            this.groupBox20.SuspendLayout();
+            this.iPG_OutputToFile.SuspendLayout();
+            this.groupBox8.SuspendLayout();
+            this.iPG_OutputToDirectory.SuspendLayout();
+            this.groupBox9.SuspendLayout();
+            this.iPG_Final.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.iErrorProvider)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // iWizard
+            // 
+            this.iWizard.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iWizard.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.iWizard.Location = new System.Drawing.Point(0, 0);
+            this.iWizard.Margin = new System.Windows.Forms.Padding(0);
+            this.iWizard.Name = "iWizard";
+            this.iWizard.Pages.AddRange(new SymbianWizardLib.GUI.SymWizardPage[] {
+            this.iPG_OpType,
+            this.iPG_SourceData_Log,
+            this.iPG_SourceData_CompareCSV,
+            this.iPG_SourceData_CompareHeapData,
+            this.iPG_Cmn_Symbolics,
+            this.iPG_Cmn_Filters,
+            this.iPG_OutputToFile,
+            this.iPG_OutputToDirectory,
+            this.iPG_Final});
+            this.iWizard.Size = new System.Drawing.Size(573, 497);
+            this.iWizard.TabIndex = 0;
+            this.iWizard.WizardClosedFromFinish += new SymbianWizardLib.GUI.SymWizard.WizardClosedFromFinishHandler(this.iWizard_WizardClosedFromFinish);
+            this.iWizard.WizardClosedFromAuxillary += new SymbianWizardLib.GUI.SymWizard.WizardClosedFromAuxillaryHandler(this.iWizard_WizardClosedFromAuxillary);
+            // 
+            // iPG_OpType
+            // 
+            this.iPG_OpType.Controls.Add(this.iPG1_OpType_GroupBox);
+            this.iPG_OpType.Controls.Add(this.iLbl_Version);
+            this.iPG_OpType.Controls.Add(this.header4);
+            this.iPG_OpType.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_OpType.Location = new System.Drawing.Point(0, 0);
+            this.iPG_OpType.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_OpType.Name = "iPG_OpType";
+            this.iPG_OpType.Size = new System.Drawing.Size(573, 441);
+            this.iPG_OpType.TabIndex = 8;
+            this.iPG_OpType.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG1_OpType_CloseFromNext);
+            // 
+            // iPG1_OpType_GroupBox
+            // 
+            this.iPG1_OpType_GroupBox.AutoSize = true;
+            this.iPG1_OpType_GroupBox.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.iPG1_OpType_GroupBox.Controls.Add(this.iPG1_OpType_FLP);
+            this.iPG1_OpType_GroupBox.Location = new System.Drawing.Point(139, 162);
+            this.iPG1_OpType_GroupBox.Name = "iPG1_OpType_GroupBox";
+            this.iPG1_OpType_GroupBox.Size = new System.Drawing.Size(270, 131);
+            this.iPG1_OpType_GroupBox.TabIndex = 4;
+            this.iPG1_OpType_GroupBox.TabStop = false;
+            this.iPG1_OpType_GroupBox.Text = " Operation type ";
+            // 
+            // iPG1_OpType_FLP
+            // 
+            this.iPG1_OpType_FLP.AutoSize = true;
+            this.iPG1_OpType_FLP.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.iPG1_OpType_FLP.Controls.Add(this.iPG1_RB_OpType_HeapViewer);
+            this.iPG1_OpType_FLP.Controls.Add(this.iPG1_RB_OpType_CompareHeapDump);
+            this.iPG1_OpType_FLP.Controls.Add(this.iPG1_RB_OpType_CompareCSV);
+            this.iPG1_OpType_FLP.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG1_OpType_FLP.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
+            this.iPG1_OpType_FLP.Location = new System.Drawing.Point(3, 17);
+            this.iPG1_OpType_FLP.Name = "iPG1_OpType_FLP";
+            this.iPG1_OpType_FLP.Padding = new System.Windows.Forms.Padding(15);
+            this.iPG1_OpType_FLP.Size = new System.Drawing.Size(264, 111);
+            this.iPG1_OpType_FLP.TabIndex = 2;
+            this.iPG1_OpType_FLP.WrapContents = false;
+            // 
+            // iPG1_RB_OpType_HeapViewer
+            // 
+            this.iPG1_RB_OpType_HeapViewer.AutoSize = true;
+            this.iPG1_RB_OpType_HeapViewer.Checked = true;
+            this.iPG1_RB_OpType_HeapViewer.Location = new System.Drawing.Point(18, 18);
+            this.iPG1_RB_OpType_HeapViewer.Name = "iPG1_RB_OpType_HeapViewer";
+            this.iPG1_RB_OpType_HeapViewer.Padding = new System.Windows.Forms.Padding(2);
+            this.iPG1_RB_OpType_HeapViewer.Size = new System.Drawing.Size(228, 21);
+            this.iPG1_RB_OpType_HeapViewer.TabIndex = 2;
+            this.iPG1_RB_OpType_HeapViewer.TabStop = true;
+            this.iPG1_RB_OpType_HeapViewer.Text = "Interactively inspect MemSpy Heap Dump";
+            // 
+            // iPG1_RB_OpType_CompareHeapDump
+            // 
+            this.iPG1_RB_OpType_CompareHeapDump.AutoSize = true;
+            this.iPG1_RB_OpType_CompareHeapDump.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.iPG1_RB_OpType_CompareHeapDump.Location = new System.Drawing.Point(18, 45);
+            this.iPG1_RB_OpType_CompareHeapDump.Name = "iPG1_RB_OpType_CompareHeapDump";
+            this.iPG1_RB_OpType_CompareHeapDump.Padding = new System.Windows.Forms.Padding(2);
+            this.iPG1_RB_OpType_CompareHeapDump.Size = new System.Drawing.Size(199, 21);
+            this.iPG1_RB_OpType_CompareHeapDump.TabIndex = 6;
+            this.iPG1_RB_OpType_CompareHeapDump.Text = "Compare two MemSpy Heap Dumps";
+            // 
+            // iPG1_RB_OpType_CompareCSV
+            // 
+            this.iPG1_RB_OpType_CompareCSV.AutoSize = true;
+            this.iPG1_RB_OpType_CompareCSV.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.iPG1_RB_OpType_CompareCSV.Location = new System.Drawing.Point(18, 72);
+            this.iPG1_RB_OpType_CompareCSV.Name = "iPG1_RB_OpType_CompareCSV";
+            this.iPG1_RB_OpType_CompareCSV.Padding = new System.Windows.Forms.Padding(2);
+            this.iPG1_RB_OpType_CompareCSV.Size = new System.Drawing.Size(226, 21);
+            this.iPG1_RB_OpType_CompareCSV.TabIndex = 6;
+            this.iPG1_RB_OpType_CompareCSV.Text = "Compare MemSpy Compact Heap Listings";
+            // 
+            // iLbl_Version
+            // 
+            this.iLbl_Version.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
+            this.iLbl_Version.Location = new System.Drawing.Point(200, 385);
+            this.iLbl_Version.Name = "iLbl_Version";
+            this.iLbl_Version.Size = new System.Drawing.Size(361, 45);
+            this.iLbl_Version.TabIndex = 3;
+            this.iLbl_Version.Text = "Copyright && version information go here";
+            // 
+            // header4
+            // 
+            this.header4.BackColor = System.Drawing.SystemColors.Window;
+            this.header4.CausesValidation = false;
+            this.header4.Description = resources.GetString("header4.Description");
+            this.header4.Dock = System.Windows.Forms.DockStyle.Top;
+            this.header4.Image = null;
+            this.header4.Location = new System.Drawing.Point(0, 0);
+            this.header4.Margin = new System.Windows.Forms.Padding(0);
+            this.header4.Name = "header4";
+            this.header4.Size = new System.Drawing.Size(573, 87);
+            this.header4.TabIndex = 1;
+            this.header4.Title = "Operation Type";
+            // 
+            // iPG_SourceData_Log
+            // 
+            this.iPG_SourceData_Log.Controls.Add(this.groupBox7);
+            this.iPG_SourceData_Log.Controls.Add(this.header5);
+            this.iPG_SourceData_Log.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_SourceData_Log.Location = new System.Drawing.Point(0, 0);
+            this.iPG_SourceData_Log.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_SourceData_Log.Name = "iPG_SourceData_Log";
+            this.iPG_SourceData_Log.Size = new System.Drawing.Size(573, 441);
+            this.iPG_SourceData_Log.TabIndex = 9;
+            this.iPG_SourceData_Log.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG_SourceData_Log_CloseFromNext);
+            // 
+            // groupBox7
+            // 
+            this.groupBox7.Controls.Add(this.iPG_SourceData_Log_FB);
+            this.groupBox7.Location = new System.Drawing.Point(16, 80);
+            this.groupBox7.Name = "groupBox7";
+            this.groupBox7.Size = new System.Drawing.Size(536, 58);
+            this.groupBox7.TabIndex = 8;
+            this.groupBox7.TabStop = false;
+            this.groupBox7.Text = " Log File ";
+            // 
+            // iPG_SourceData_Log_FB
+            // 
+            this.iPG_SourceData_Log_FB.DialogFilter = "Log Files (*.log;*.txt)|*.log;*.txt|All Files (*.*)|*.*";
+            this.iPG_SourceData_Log_FB.DialogTitle = "Select Log";
+            this.iPG_SourceData_Log_FB.Location = new System.Drawing.Point(17, 22);
+            this.iPG_SourceData_Log_FB.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_SourceData_Log_FB.MinimumSize = new System.Drawing.Size(396, 21);
+            this.iPG_SourceData_Log_FB.Name = "iPG_SourceData_Log_FB";
+            this.iPG_SourceData_Log_FB.Size = new System.Drawing.Size(506, 21);
+            this.iPG_SourceData_Log_FB.TabIndex = 10;
+            // 
+            // header5
+            // 
+            this.header5.BackColor = System.Drawing.SystemColors.Window;
+            this.header5.CausesValidation = false;
+            this.header5.Description = "Select the file to be analysed";
+            this.header5.Dock = System.Windows.Forms.DockStyle.Top;
+            this.header5.Image = null;
+            this.header5.Location = new System.Drawing.Point(0, 0);
+            this.header5.Name = "header5";
+            this.header5.Size = new System.Drawing.Size(573, 64);
+            this.header5.TabIndex = 1;
+            this.header5.Title = "Log Analysis";
+            // 
+            // iPG_SourceData_CompareCSV
+            // 
+            this.iPG_SourceData_CompareCSV.Controls.Add(this.iPG_SourceData_CompareCSV_Files);
+            this.iPG_SourceData_CompareCSV.Controls.Add(this.symWizardHeaderSection1);
+            this.iPG_SourceData_CompareCSV.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_SourceData_CompareCSV.Location = new System.Drawing.Point(0, 0);
+            this.iPG_SourceData_CompareCSV.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_SourceData_CompareCSV.Name = "iPG_SourceData_CompareCSV";
+            this.iPG_SourceData_CompareCSV.Size = new System.Drawing.Size(573, 441);
+            this.iPG_SourceData_CompareCSV.TabIndex = 3;
+            this.iPG_SourceData_CompareCSV.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG_SourceData_CompareCSV_PageClosedFromButtonNext);
+            // 
+            // iPG_SourceData_CompareCSV_Files
+            // 
+            this.iPG_SourceData_CompareCSV_Files.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                        | System.Windows.Forms.AnchorStyles.Left)
+                        | System.Windows.Forms.AnchorStyles.Right)));
+            this.iPG_SourceData_CompareCSV_Files.DialogFilter = "Compact Heap Data files (*.txt;*.log;*.csv)|*.txt;*.log;*.csv|All files (*.*)|*.*" +
+                "";
+            this.iPG_SourceData_CompareCSV_Files.DialogMultiselect = true;
+            this.iPG_SourceData_CompareCSV_Files.DialogTitle = "Select files to compare...";
+            this.iPG_SourceData_CompareCSV_Files.FileName = "";
+            this.iPG_SourceData_CompareCSV_Files.FileNames = ((System.Collections.Generic.List<string>)(resources.GetObject("iPG_SourceData_CompareCSV_Files.FileNames")));
+            this.iPG_SourceData_CompareCSV_Files.Location = new System.Drawing.Point(16, 77);
+            this.iPG_SourceData_CompareCSV_Files.Name = "iPG_SourceData_CompareCSV_Files";
+            this.iPG_SourceData_CompareCSV_Files.Size = new System.Drawing.Size(540, 357);
+            this.iPG_SourceData_CompareCSV_Files.TabIndex = 13;
+            // 
+            // symWizardHeaderSection1
+            // 
+            this.symWizardHeaderSection1.BackColor = System.Drawing.SystemColors.Window;
+            this.symWizardHeaderSection1.CausesValidation = false;
+            this.symWizardHeaderSection1.Description = "Select the heap data CSV or trace files to be compared";
+            this.symWizardHeaderSection1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.symWizardHeaderSection1.Image = null;
+            this.symWizardHeaderSection1.Location = new System.Drawing.Point(0, 0);
+            this.symWizardHeaderSection1.Name = "symWizardHeaderSection1";
+            this.symWizardHeaderSection1.Size = new System.Drawing.Size(573, 64);
+            this.symWizardHeaderSection1.TabIndex = 10;
+            this.symWizardHeaderSection1.Title = "Compare MemSpy CSV Data";
+            // 
+            // iPG_SourceData_CompareHeapData
+            // 
+            this.iPG_SourceData_CompareHeapData.Controls.Add(this.iPG_SourceData_CompareHeapData_GP_Log2);
+            this.iPG_SourceData_CompareHeapData.Controls.Add(this.iPG_SourceData_CompareHeapData_GP_Log1);
+            this.iPG_SourceData_CompareHeapData.Controls.Add(this.header3);
+            this.iPG_SourceData_CompareHeapData.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_SourceData_CompareHeapData.Location = new System.Drawing.Point(0, 0);
+            this.iPG_SourceData_CompareHeapData.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_SourceData_CompareHeapData.Name = "iPG_SourceData_CompareHeapData";
+            this.iPG_SourceData_CompareHeapData.Size = new System.Drawing.Size(573, 441);
+            this.iPG_SourceData_CompareHeapData.TabIndex = 18;
+            this.iPG_SourceData_CompareHeapData.PageShownFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageShownFromButtonNextHandler(this.iPG_SourceData_CompareHeapData_PageShownFromButtonNext);
+            this.iPG_SourceData_CompareHeapData.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG202_SourceData_Comparison_CloseFromNext);
+            // 
+            // iPG_SourceData_CompareHeapData_GP_Log2
+            // 
+            this.iPG_SourceData_CompareHeapData_GP_Log2.Controls.Add(this.iPG202_Combo_ThreadName2);
+            this.iPG_SourceData_CompareHeapData_GP_Log2.Controls.Add(this.iPG202_TB_LogFile2);
+            this.iPG_SourceData_CompareHeapData_GP_Log2.Controls.Add(this.label3);
+            this.iPG_SourceData_CompareHeapData_GP_Log2.Location = new System.Drawing.Point(16, 187);
+            this.iPG_SourceData_CompareHeapData_GP_Log2.Name = "iPG_SourceData_CompareHeapData_GP_Log2";
+            this.iPG_SourceData_CompareHeapData_GP_Log2.Size = new System.Drawing.Size(536, 91);
+            this.iPG_SourceData_CompareHeapData_GP_Log2.TabIndex = 9;
+            this.iPG_SourceData_CompareHeapData_GP_Log2.TabStop = false;
+            this.iPG_SourceData_CompareHeapData_GP_Log2.Text = " Log File 2";
+            // 
+            // iPG202_Combo_ThreadName2
+            // 
+            this.iPG202_Combo_ThreadName2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.iPG202_Combo_ThreadName2.FormattingEnabled = true;
+            this.iPG202_Combo_ThreadName2.Location = new System.Drawing.Point(95, 57);
+            this.iPG202_Combo_ThreadName2.MaxDropDownItems = 14;
+            this.iPG202_Combo_ThreadName2.Name = "iPG202_Combo_ThreadName2";
+            this.iPG202_Combo_ThreadName2.Size = new System.Drawing.Size(376, 21);
+            this.iPG202_Combo_ThreadName2.TabIndex = 32;
+            // 
+            // iPG202_TB_LogFile2
+            // 
+            this.iPG202_TB_LogFile2.DialogFilter = "Log Files (*.log;*.txt)|*.log;*.txt|All Files (*.*)|*.*";
+            this.iPG202_TB_LogFile2.DialogTitle = "Select Log 2";
+            this.iPG202_TB_LogFile2.Location = new System.Drawing.Point(17, 22);
+            this.iPG202_TB_LogFile2.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG202_TB_LogFile2.MinimumSize = new System.Drawing.Size(396, 21);
+            this.iPG202_TB_LogFile2.Name = "iPG202_TB_LogFile2";
+            this.iPG202_TB_LogFile2.Size = new System.Drawing.Size(506, 21);
+            this.iPG202_TB_LogFile2.TabIndex = 0;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(17, 60);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(73, 13);
+            this.label3.TabIndex = 31;
+            this.label3.Text = "Thread name:";
+            // 
+            // iPG_SourceData_CompareHeapData_GP_Log1
+            // 
+            this.iPG_SourceData_CompareHeapData_GP_Log1.Controls.Add(this.iPG202_Combo_ThreadName1);
+            this.iPG_SourceData_CompareHeapData_GP_Log1.Controls.Add(this.label2);
+            this.iPG_SourceData_CompareHeapData_GP_Log1.Controls.Add(this.iPG202_TB_LogFile1);
+            this.iPG_SourceData_CompareHeapData_GP_Log1.Location = new System.Drawing.Point(16, 80);
+            this.iPG_SourceData_CompareHeapData_GP_Log1.Name = "iPG_SourceData_CompareHeapData_GP_Log1";
+            this.iPG_SourceData_CompareHeapData_GP_Log1.Size = new System.Drawing.Size(536, 91);
+            this.iPG_SourceData_CompareHeapData_GP_Log1.TabIndex = 9;
+            this.iPG_SourceData_CompareHeapData_GP_Log1.TabStop = false;
+            this.iPG_SourceData_CompareHeapData_GP_Log1.Text = " Log File 1";
+            // 
+            // iPG202_Combo_ThreadName1
+            // 
+            this.iPG202_Combo_ThreadName1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.iPG202_Combo_ThreadName1.FormattingEnabled = true;
+            this.iPG202_Combo_ThreadName1.Location = new System.Drawing.Point(95, 57);
+            this.iPG202_Combo_ThreadName1.MaxDropDownItems = 14;
+            this.iPG202_Combo_ThreadName1.Name = "iPG202_Combo_ThreadName1";
+            this.iPG202_Combo_ThreadName1.Size = new System.Drawing.Size(376, 21);
+            this.iPG202_Combo_ThreadName1.TabIndex = 32;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(17, 60);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(73, 13);
+            this.label2.TabIndex = 31;
+            this.label2.Text = "Thread name:";
+            // 
+            // iPG202_TB_LogFile1
+            // 
+            this.iPG202_TB_LogFile1.DialogFilter = "Log Files (*.log;*.txt)|*.log;*.txt|All Files (*.*)|*.*";
+            this.iPG202_TB_LogFile1.DialogTitle = "Select Log 1";
+            this.iPG202_TB_LogFile1.Location = new System.Drawing.Point(17, 22);
+            this.iPG202_TB_LogFile1.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG202_TB_LogFile1.MinimumSize = new System.Drawing.Size(396, 21);
+            this.iPG202_TB_LogFile1.Name = "iPG202_TB_LogFile1";
+            this.iPG202_TB_LogFile1.Size = new System.Drawing.Size(506, 21);
+            this.iPG202_TB_LogFile1.TabIndex = 0;
+            // 
+            // header3
+            // 
+            this.header3.BackColor = System.Drawing.SystemColors.Window;
+            this.header3.CausesValidation = false;
+            this.header3.Description = "Select the heap data log files to be compared. A common thread must exist in each" +
+                " log file so that two heap dumps can be directly compared.";
+            this.header3.Dock = System.Windows.Forms.DockStyle.Top;
+            this.header3.Image = null;
+            this.header3.Location = new System.Drawing.Point(0, 0);
+            this.header3.Name = "header3";
+            this.header3.Size = new System.Drawing.Size(573, 64);
+            this.header3.TabIndex = 2;
+            this.header3.Title = "Compare MemSpy Heap Dumps";
+            // 
+            // iPG_Cmn_Symbolics
+            // 
+            this.iPG_Cmn_Symbolics.Controls.Add(this.iPG301_DebugControl);
+            this.iPG_Cmn_Symbolics.Controls.Add(this.header7);
+            this.iPG_Cmn_Symbolics.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_Cmn_Symbolics.Location = new System.Drawing.Point(0, 0);
+            this.iPG_Cmn_Symbolics.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_Cmn_Symbolics.Name = "iPG_Cmn_Symbolics";
+            this.iPG_Cmn_Symbolics.Size = new System.Drawing.Size(573, 441);
+            this.iPG_Cmn_Symbolics.TabIndex = 11;
+            this.iPG_Cmn_Symbolics.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG301_AnalysisSymbolics_CloseFromNext);
+            // 
+            // iPG301_DebugControl
+            // 
+            this.iPG301_DebugControl.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG301_DebugControl.Location = new System.Drawing.Point(0, 64);
+            this.iPG301_DebugControl.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG301_DebugControl.Name = "iPG301_DebugControl";
+            this.iPG301_DebugControl.Size = new System.Drawing.Size(573, 377);
+            this.iPG301_DebugControl.TabIndex = 14;
+            // 
+            // header7
+            // 
+            this.header7.BackColor = System.Drawing.SystemColors.Window;
+            this.header7.CausesValidation = false;
+            this.header7.Description = "In order to resolve object class types the tool requires access to both a Symbol " +
+                "file and (for NAND-based products) the location of the image\'s Map files.";
+            this.header7.Dock = System.Windows.Forms.DockStyle.Top;
+            this.header7.Image = null;
+            this.header7.Location = new System.Drawing.Point(0, 0);
+            this.header7.Name = "header7";
+            this.header7.Size = new System.Drawing.Size(573, 64);
+            this.header7.TabIndex = 2;
+            this.header7.Title = "Symbolics";
+            // 
+            // iPG_Cmn_Filters
+            // 
+            this.iPG_Cmn_Filters.Controls.Add(this.groupBox20);
+            this.iPG_Cmn_Filters.Controls.Add(this.header6);
+            this.iPG_Cmn_Filters.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_Cmn_Filters.Location = new System.Drawing.Point(0, 0);
+            this.iPG_Cmn_Filters.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_Cmn_Filters.Name = "iPG_Cmn_Filters";
+            this.iPG_Cmn_Filters.Size = new System.Drawing.Size(573, 441);
+            this.iPG_Cmn_Filters.TabIndex = 10;
+            this.iPG_Cmn_Filters.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG302_Cmn_Filters_CloseFromNext);
+            // 
+            // groupBox20
+            // 
+            this.groupBox20.Controls.Add(this.label8);
+            this.groupBox20.Controls.Add(this.iPG302_Combo_Filter);
+            this.groupBox20.Controls.Add(this.label41);
+            this.groupBox20.Location = new System.Drawing.Point(16, 80);
+            this.groupBox20.Name = "groupBox20";
+            this.groupBox20.Size = new System.Drawing.Size(536, 105);
+            this.groupBox20.TabIndex = 32;
+            this.groupBox20.TabStop = false;
+            this.groupBox20.Text = " Inspected Thread";
+            // 
+            // label8
+            // 
+            this.label8.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+            this.label8.Location = new System.Drawing.Point(116, 60);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(384, 32);
+            this.label8.TabIndex = 35;
+            this.label8.Text = "If the captured data contains heap information for more than one thread, then sel" +
+                "ect the entity you wish to study from the above list.";
+            // 
+            // iPG302_Combo_Filter
+            // 
+            this.iPG302_Combo_Filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.iPG302_Combo_Filter.FormattingEnabled = true;
+            this.iPG302_Combo_Filter.Location = new System.Drawing.Point(116, 26);
+            this.iPG302_Combo_Filter.MaxDropDownItems = 14;
+            this.iPG302_Combo_Filter.Name = "iPG302_Combo_Filter";
+            this.iPG302_Combo_Filter.Size = new System.Drawing.Size(376, 21);
+            this.iPG302_Combo_Filter.TabIndex = 30;
+            // 
+            // label41
+            // 
+            this.label41.AutoSize = true;
+            this.label41.Location = new System.Drawing.Point(16, 30);
+            this.label41.Name = "label41";
+            this.label41.Size = new System.Drawing.Size(73, 13);
+            this.label41.TabIndex = 24;
+            this.label41.Text = "Thread name:";
+            // 
+            // header6
+            // 
+            this.header6.BackColor = System.Drawing.SystemColors.Window;
+            this.header6.CausesValidation = false;
+            this.header6.Description = "Define the trace prefix and/or filters used to analyse the logs";
+            this.header6.Dock = System.Windows.Forms.DockStyle.Top;
+            this.header6.Image = null;
+            this.header6.Location = new System.Drawing.Point(0, 0);
+            this.header6.Name = "header6";
+            this.header6.Size = new System.Drawing.Size(573, 64);
+            this.header6.TabIndex = 2;
+            this.header6.Title = "Analysis Filters";
+            // 
+            // iPG_OutputToFile
+            // 
+            this.iPG_OutputToFile.Controls.Add(this.groupBox8);
+            this.iPG_OutputToFile.Controls.Add(this.iHeader_OutputToFile);
+            this.iPG_OutputToFile.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_OutputToFile.Location = new System.Drawing.Point(0, 0);
+            this.iPG_OutputToFile.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_OutputToFile.Name = "iPG_OutputToFile";
+            this.iPG_OutputToFile.Size = new System.Drawing.Size(573, 441);
+            this.iPG_OutputToFile.TabIndex = 19;
+            this.iPG_OutputToFile.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG500_Comparison_Output_CloseFromNext);
+            // 
+            // groupBox8
+            // 
+            this.groupBox8.Controls.Add(this.iPG_OutputToFile_FB);
+            this.groupBox8.Location = new System.Drawing.Point(16, 80);
+            this.groupBox8.Name = "groupBox8";
+            this.groupBox8.Size = new System.Drawing.Size(536, 64);
+            this.groupBox8.TabIndex = 12;
+            this.groupBox8.TabStop = false;
+            // 
+            // iPG_OutputToFile_FB
+            // 
+            this.iPG_OutputToFile_FB.DialogFilter = "(*.xls)|*.xls";
+            this.iPG_OutputToFile_FB.DialogTitle = "Output File";
+            this.iPG_OutputToFile_FB.EntityMustExist = false;
+            this.iPG_OutputToFile_FB.Location = new System.Drawing.Point(15, 22);
+            this.iPG_OutputToFile_FB.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_OutputToFile_FB.MinimumSize = new System.Drawing.Size(396, 21);
+            this.iPG_OutputToFile_FB.Name = "iPG_OutputToFile_FB";
+            this.iPG_OutputToFile_FB.Size = new System.Drawing.Size(506, 21);
+            this.iPG_OutputToFile_FB.TabIndex = 0;
+            // 
+            // iHeader_OutputToFile
+            // 
+            this.iHeader_OutputToFile.BackColor = System.Drawing.SystemColors.Window;
+            this.iHeader_OutputToFile.CausesValidation = false;
+            this.iHeader_OutputToFile.Description = "Enter a destination file for the ";
+            this.iHeader_OutputToFile.Dock = System.Windows.Forms.DockStyle.Top;
+            this.iHeader_OutputToFile.Image = null;
+            this.iHeader_OutputToFile.Location = new System.Drawing.Point(0, 0);
+            this.iHeader_OutputToFile.Name = "iHeader_OutputToFile";
+            this.iHeader_OutputToFile.Size = new System.Drawing.Size(573, 64);
+            this.iHeader_OutputToFile.TabIndex = 11;
+            this.iHeader_OutputToFile.Title = "<DYNAMIC CONTENT>";
+            // 
+            // iPG_OutputToDirectory
+            // 
+            this.iPG_OutputToDirectory.Controls.Add(this.groupBox9);
+            this.iPG_OutputToDirectory.Controls.Add(this.iHeader_OutputToDirectory);
+            this.iPG_OutputToDirectory.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_OutputToDirectory.Location = new System.Drawing.Point(0, 0);
+            this.iPG_OutputToDirectory.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_OutputToDirectory.Name = "iPG_OutputToDirectory";
+            this.iPG_OutputToDirectory.Size = new System.Drawing.Size(573, 441);
+            this.iPG_OutputToDirectory.TabIndex = 13;
+            this.iPG_OutputToDirectory.PageClosedFromButtonNext += new SymbianWizardLib.GUI.SymWizardPage.PageClosedFromButtonNextHandler(this.iPG_OutputToDirectory_CloseFromNext);
+            // 
+            // groupBox9
+            // 
+            this.groupBox9.Controls.Add(this.iPG_OutputToDirectory_FB);
+            this.groupBox9.Location = new System.Drawing.Point(16, 80);
+            this.groupBox9.Name = "groupBox9";
+            this.groupBox9.Size = new System.Drawing.Size(536, 64);
+            this.groupBox9.TabIndex = 10;
+            this.groupBox9.TabStop = false;
+            // 
+            // iPG_OutputToDirectory_FB
+            // 
+            this.iPG_OutputToDirectory_FB.DialogDescription = "Select destination location";
+            this.iPG_OutputToDirectory_FB.Location = new System.Drawing.Point(15, 22);
+            this.iPG_OutputToDirectory_FB.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_OutputToDirectory_FB.MinimumSize = new System.Drawing.Size(396, 21);
+            this.iPG_OutputToDirectory_FB.Name = "iPG_OutputToDirectory_FB";
+            this.iPG_OutputToDirectory_FB.Size = new System.Drawing.Size(506, 21);
+            this.iPG_OutputToDirectory_FB.TabIndex = 14;
+            // 
+            // iHeader_OutputToDirectory
+            // 
+            this.iHeader_OutputToDirectory.BackColor = System.Drawing.SystemColors.Window;
+            this.iHeader_OutputToDirectory.CausesValidation = false;
+            this.iHeader_OutputToDirectory.Description = "Enter a destination location for the ";
+            this.iHeader_OutputToDirectory.Dock = System.Windows.Forms.DockStyle.Top;
+            this.iHeader_OutputToDirectory.Image = null;
+            this.iHeader_OutputToDirectory.Location = new System.Drawing.Point(0, 0);
+            this.iHeader_OutputToDirectory.Name = "iHeader_OutputToDirectory";
+            this.iHeader_OutputToDirectory.Size = new System.Drawing.Size(573, 64);
+            this.iHeader_OutputToDirectory.TabIndex = 1;
+            this.iHeader_OutputToDirectory.Title = "<DYNAMIC CONTENT>";
+            // 
+            // iPG_Final
+            // 
+            this.iPG_Final.BackColor = System.Drawing.SystemColors.Window;
+            this.iPG_Final.Controls.Add(this.iPG5000_InfoControl);
+            this.iPG_Final.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG_Final.IsFinishingPage = true;
+            this.iPG_Final.Location = new System.Drawing.Point(0, 0);
+            this.iPG_Final.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG_Final.Name = "iPG_Final";
+            this.iPG_Final.Size = new System.Drawing.Size(573, 441);
+            this.iPG_Final.TabIndex = 4;
+            // 
+            // iPG5000_InfoControl
+            // 
+            this.iPG5000_InfoControl.BackColor = System.Drawing.SystemColors.Window;
+            this.iPG5000_InfoControl.Description = "The wizard has now collected enough information. Press Finish to start the analys" +
+                "is phase.";
+            this.iPG5000_InfoControl.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.iPG5000_InfoControl.Location = new System.Drawing.Point(0, 0);
+            this.iPG5000_InfoControl.Margin = new System.Windows.Forms.Padding(0);
+            this.iPG5000_InfoControl.Name = "iPG5000_InfoControl";
+            this.iPG5000_InfoControl.Size = new System.Drawing.Size(573, 441);
+            this.iPG5000_InfoControl.TabIndex = 0;
+            this.iPG5000_InfoControl.Title = "Ready to Analyse";
+            // 
+            // label1
+            // 
+            this.label1.Location = new System.Drawing.Point(16, 88);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(88, 16);
+            this.label1.TabIndex = 31;
+            this.label1.Text = "Rebuild kernel?";
+            // 
+            // iErrorProvider
+            // 
+            this.iErrorProvider.ContainerControl = this;
+            // 
+            // HASetupWizard
+            // 
+            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+            this.ClientSize = new System.Drawing.Size(573, 497);
+            this.Controls.Add(this.iWizard);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "HASetupWizard";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Heap Analyser Setup Wizard";
+            this.Load += new System.EventHandler(this.Form_Load);
+            this.Closing += new System.ComponentModel.CancelEventHandler(this.Form_Closing);
+            this.iPG_OpType.ResumeLayout(false);
+            this.iPG_OpType.PerformLayout();
+            this.iPG1_OpType_GroupBox.ResumeLayout(false);
+            this.iPG1_OpType_GroupBox.PerformLayout();
+            this.iPG1_OpType_FLP.ResumeLayout(false);
+            this.iPG1_OpType_FLP.PerformLayout();
+            this.iPG_SourceData_Log.ResumeLayout(false);
+            this.groupBox7.ResumeLayout(false);
+            this.iPG_SourceData_CompareCSV.ResumeLayout(false);
+            this.iPG_SourceData_CompareHeapData.ResumeLayout(false);
+            this.iPG_SourceData_CompareHeapData_GP_Log2.ResumeLayout(false);
+            this.iPG_SourceData_CompareHeapData_GP_Log2.PerformLayout();
+            this.iPG_SourceData_CompareHeapData_GP_Log1.ResumeLayout(false);
+            this.iPG_SourceData_CompareHeapData_GP_Log1.PerformLayout();
+            this.iPG_Cmn_Symbolics.ResumeLayout(false);
+            this.iPG_Cmn_Filters.ResumeLayout(false);
+            this.groupBox20.ResumeLayout(false);
+            this.groupBox20.PerformLayout();
+            this.iPG_OutputToFile.ResumeLayout(false);
+            this.groupBox8.ResumeLayout(false);
+            this.iPG_OutputToDirectory.ResumeLayout(false);
+            this.groupBox9.ResumeLayout(false);
+            this.iPG_Final.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.iErrorProvider)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private SymbianWizardLib.GUI.SymWizard iWizard;
+        private System.Windows.Forms.Label label1;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_OpType;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_Cmn_Symbolics;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_Cmn_Filters;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_OutputToDirectory;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection header4;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_Final;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection header5;
+        private System.Windows.Forms.GroupBox groupBox7;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection header6;
+        private System.Windows.Forms.GroupBox groupBox20;
+        private System.Windows.Forms.Label label41;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection header7;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection iHeader_OutputToDirectory;
+        private System.Windows.Forms.GroupBox groupBox9;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_SourceData_Log;
+        private System.Windows.Forms.Label iLbl_Version;
+        private System.Windows.Forms.ComboBox iPG302_Combo_Filter;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.ErrorProvider iErrorProvider;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_SourceData_CompareHeapData;
+        private System.Windows.Forms.GroupBox iPG_SourceData_CompareHeapData_GP_Log1;
+        private SymbianUtilsUi.Controls.SymbianFileBrowserControl iPG202_TB_LogFile1;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection header3;
+        private System.Windows.Forms.GroupBox iPG_SourceData_CompareHeapData_GP_Log2;
+        private SymbianUtilsUi.Controls.SymbianFileBrowserControl iPG202_TB_LogFile2;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_OutputToFile;
+        private System.Windows.Forms.GroupBox groupBox8;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection iHeader_OutputToFile;
+        private SymbianUtilsUi.Controls.SymbianFileSaveAsControl iPG_OutputToFile_FB;
+        private SymbianWizardLib.GUI.SymWizardInfoControl iPG5000_InfoControl;
+        private System.Windows.Forms.GroupBox iPG1_OpType_GroupBox;
+        private System.Windows.Forms.FlowLayoutPanel iPG1_OpType_FLP;
+        private System.Windows.Forms.RadioButton iPG1_RB_OpType_HeapViewer;
+        private System.Windows.Forms.RadioButton iPG1_RB_OpType_CompareHeapDump;
+        private SymbianDebugLibUi.Controls.DebugEngineControl iPG301_DebugControl;
+        private System.Windows.Forms.RadioButton iPG1_RB_OpType_CompareCSV;
+        private SymbianWizardLib.GUI.SymWizardPage iPG_SourceData_CompareCSV;
+        private SymbianWizardLib.GUI.SymWizardHeaderSection symWizardHeaderSection1;
+        private SymbianUtilsUi.Controls.SymbianFileListManagementControl iPG_SourceData_CompareCSV_Files;
+        private System.Windows.Forms.ComboBox iPG202_Combo_ThreadName2;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.ComboBox iPG202_Combo_ThreadName1;
+        private System.Windows.Forms.Label label2;
+        private SymbianUtilsUi.Controls.SymbianFileBrowserControl iPG_SourceData_Log_FB;
+        private SymbianUtilsUi.Controls.SymbianFolderBrowserControl iPG_OutputToDirectory_FB;
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Graphical/Wizard/HASetupWizard.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,594 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Drawing;
+using System.Collections;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+using System.Management;
+using System.Text;
+using SymbianUtils.Settings;
+using SymbianUtilsUi.Dialogs;
+using HeapAnalyser.Engine;
+using HeapAnalyser.Engine.Types;
+using HeapLib;
+using HeapLib.Constants;
+using HeapLib.Reconstructor;
+using HeapLib.Reconstructor.Misc;
+using HeapLib.Reconstructor.DataSources;
+using HeapLib.Reconstructor.DataSources.Analyser;
+using HeapUiLib.Dialogs;
+using SymbianWizardLib.Engine;
+using SymbianWizardLib.GUI;
+using SymbianDebugLib.Engine;
+using SymbianDebugLibUi.Controls;
+
+namespace HeapAnalyser.UIs.Graphical.Wizard
+{
+    public partial class HASetupWizard : Form
+    {
+		#region Constructors & destructors
+        public HASetupWizard( XmlSettings aSettings, HeapWizardEngine aEngine )
+		{
+			iSettings = aSettings;
+			iEngine = aEngine;
+			//
+			InitializeComponent();
+		}
+		#endregion
+
+		#region Form event handlers
+        private void Form_Load( object sender, System.EventArgs e )
+		{
+            // Set up version information
+            iLbl_Version.Text = HeapLibConstants.Version + " " + HeapLibConstants.Copyright;
+			iSettings[ "Wizard", "DialogResult"] = DialogResult.None.ToString();
+			//
+            Setup_OpType();
+            //
+            Setup_SourceData_LogFileName();
+            Setup_SourceData_HeapDataComparison();
+            Setup_SourceData_HeapCSVComparison();
+            //
+            Setup_Cmn_Symbolics();
+            Setup_Cmn_Filters();
+            //
+            Setup_Output_Directory();
+            Setup_Output_File();
+		}
+
+		private void Form_Closing( object sender, System.ComponentModel.CancelEventArgs e )
+		{
+			iSettings.Store();
+		}
+
+        private void iWizard_WizardClosedFromAuxillary( SymWizardClosureEvent aEventArgs )
+		{
+			iSettings[ "Wizard", "DialogResult"] = DialogResult.Cancel.ToString();
+		}
+
+        private void iWizard_WizardClosedFromFinish( SymWizardClosureEvent aEventArgs )
+		{
+			iSettings[ "Wizard", "DialogResult"] = DialogResult.OK.ToString();
+		}
+		#endregion
+
+        #region Pages
+
+        #region Page [Operation type]
+        private void Setup_OpType()
+		{
+			string opType = iSettings[ "Wizard", "OperationType" ];
+
+			// Make sure something is selected
+            if ( opType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps.ToString() )
+            {
+                iPG1_RB_OpType_CompareHeapDump.Checked = true;
+            }
+            else if ( opType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapCSV.ToString() )
+            {
+                iPG1_RB_OpType_CompareCSV.Checked = true;
+            }
+            else
+            {
+                // Default
+                iPG1_RB_OpType_HeapViewer.Checked = true;
+            }
+        }
+
+        private void iPG1_OpType_CloseFromNext( SymWizardPageTransitionEvent aEventArgs )
+		{
+			if	( iPG1_RB_OpType_HeapViewer.Checked )
+			{
+				iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeAnalyseAndView;
+                aEventArgs.SuggestedNewPage = iPG_SourceData_Log;
+			}
+            else if ( iPG1_RB_OpType_CompareHeapDump.Checked )
+            {
+                iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps;
+                aEventArgs.SuggestedNewPage =  iPG_SourceData_CompareHeapData;
+            }
+            else if ( iPG1_RB_OpType_CompareCSV.Checked )
+			{
+				iEngine.OperationType = HeapWizardEngine.TOperationType.EOperationTypeCompareHeapCSV;
+                aEventArgs.SuggestedNewPage = iPG_SourceData_CompareCSV;
+            }
+
+            Setup_Output_File_Dynamic();
+            Setup_Output_Directory_Dynamic();
+
+            iSettings[ "Wizard", "OperationType" ] = iEngine.OperationType.ToString();
+		}
+		#endregion
+
+		#region Page [SourceData - Log file name]
+		private void Setup_SourceData_LogFileName()
+		{
+            iSettings.Load( "Wizard", iPG_SourceData_Log_FB );
+		}
+
+        private void iPG_SourceData_Log_CloseFromNext( SymWizardPageTransitionEvent aEventArgs )
+		{
+            string logFileName = iPG_SourceData_Log_FB.EntityName;
+
+            if ( !iPG_SourceData_Log_FB.IsValid )
+            {
+                aEventArgs.SuggestedNewPage = iPG_SourceData_Log;
+            }
+            else
+            {
+                iSettings.Save( "Wizard", iPG_SourceData_Log_FB );
+                //
+                iEngine.HeapDataOptions = new Options();
+                //
+                DataSourceAnalyser analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse( logFileName );
+                SeedAnalysisFiltersAfterDataSourceScan( analyser.DataSources, iPG302_Combo_Filter );
+			
+                // Only allowed to continue if we found a valid source
+                if ( iPG302_Combo_Filter.Items.Count > 0 )
+                {
+                    aEventArgs.SuggestedNewPage = iPG_Cmn_Symbolics;
+                }
+                else
+                {
+                    aEventArgs.SuggestedNewPage = aEventArgs.CurrentPage;
+                }
+			}
+		}
+		#endregion
+
+        #region Page [SourceData - Heap data comparison source files]
+        private void Setup_SourceData_HeapDataComparison()
+        {
+            iSettings.Load( "Wizard", iPG202_TB_LogFile1 );
+            iSettings.Load( "Wizard", iPG202_TB_LogFile2 );
+
+            // Start off with the combo's disabled
+            iPG202_Combo_ThreadName1.Enabled = false;
+            iPG202_Combo_ThreadName2.Enabled = false;
+
+            // We queue these up so that the scan occurs only after the page is actually displayed.
+            this.iPG202_TB_LogFile1.FileSelectionChanged += new SymbianUtilsUi.Controls.SymbianFileControl.FileSelectionChangedHandler( this.iPG202_TB_LogFile1_FileSelectionChanged );
+            this.iPG202_TB_LogFile2.FileSelectionChanged += new SymbianUtilsUi.Controls.SymbianFileControl.FileSelectionChangedHandler( this.iPG202_TB_LogFile2_FileSelectionChanged );
+        }
+
+        private void iPG202_TB_LogFile1_FileSelectionChanged( SymbianUtilsUi.Controls.SymbianFileControl aSelf, string aFileName )
+        {
+            DataSourceAnalyser analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse( aFileName );
+            SeedAnalysisFiltersAfterDataSourceScan( analyser.DataSources, iPG202_Combo_ThreadName1 );
+
+            iPG_SourceData_CompareHeapData_GP_Log2.Enabled = ( iPG202_Combo_ThreadName1.Items.Count > 0 );
+        }
+
+        private void iPG202_TB_LogFile2_FileSelectionChanged( SymbianUtilsUi.Controls.SymbianFileControl aSelf, string aFileName )
+        {
+            DataSourceAnalyser analyser = HeapReconstructorDataSourceAnalyserDialog.Analyse( aFileName );
+
+            // Get the master thread name
+            string threadName = ThreadNameFromFilterCombo( iPG202_Combo_ThreadName1 );
+            
+            if ( threadName != string.Empty )
+            {
+            }
+            else
+            {
+                analyser.DataSources.Clear();
+            }
+
+            // Seed combobox with filter options
+            SeedAnalysisFiltersAfterDataSourceScan( analyser.DataSources, iPG202_Combo_ThreadName2 );
+        }
+
+        private void iPG_SourceData_CompareHeapData_PageShownFromButtonNext( SymWizardPage aSender )
+        {
+            if ( iPG202_TB_LogFile1.EntityName != string.Empty && File.Exists( iPG202_TB_LogFile1.EntityName ) )
+            {
+                iPG202_TB_LogFile1_FileSelectionChanged( iPG202_TB_LogFile1, iPG202_TB_LogFile1.EntityName );
+            }
+            if ( iPG202_TB_LogFile2.EntityName != string.Empty && File.Exists( iPG202_TB_LogFile2.EntityName ) )
+            {
+                iPG202_TB_LogFile2_FileSelectionChanged( iPG202_TB_LogFile2, iPG202_TB_LogFile2.EntityName );
+            }
+        }
+
+        private void iPG202_SourceData_Comparison_CloseFromNext( SymWizardPageTransitionEvent aEventArgs )
+        {
+            iEngine.ComparisonEngineData.DataSource1 = DataSourceFromFilterCombo( iPG202_Combo_ThreadName1 );
+            iEngine.ComparisonEngineData.DataSource2 = DataSourceFromFilterCombo( iPG202_Combo_ThreadName2 );
+            //
+            if ( !( iPG202_TB_LogFile1.IsValid && iPG202_TB_LogFile2.IsValid ) )
+            {
+                aEventArgs.SuggestedNewPage =  iPG_SourceData_CompareHeapData;
+            }
+            else if ( iEngine.ComparisonEngineData.DataSource1 == null )
+            {
+                iPG202_TB_LogFile1.SetError( "Select a valid MemSpy heap data log" );
+                aEventArgs.SuggestedNewPage =  iPG_SourceData_CompareHeapData;
+            }
+            else if ( iEngine.ComparisonEngineData.DataSource2 == null )
+            {
+                iPG202_TB_LogFile2.SetError( "Select a valid MemSpy heap data log" );
+                aEventArgs.SuggestedNewPage =  iPG_SourceData_CompareHeapData;
+            }
+            else
+            {
+                // Get both data sources and check thread names are common
+                DataSource ds1 = (DataSource ) iPG202_Combo_ThreadName1.SelectedItem;
+                DataSource ds2 = (DataSource) iPG202_Combo_ThreadName2.SelectedItem;
+                //
+                if ( ds1.ThreadName.ToLower() != ds2.ThreadName.ToLower() )
+                {
+                    aEventArgs.SuggestedNewPage = iPG_SourceData_CompareHeapData;
+                    iErrorProvider.SetError( iPG202_Combo_ThreadName2, "Thread names differ" );
+                }
+                else
+                {
+                    iSettings.Save( "Wizard", iPG202_TB_LogFile1 );
+                    iSettings.Save( "Wizard", iPG202_TB_LogFile2 );
+
+                    iErrorProvider.Clear();
+                    aEventArgs.SuggestedNewPage = iPG_Cmn_Symbolics;
+                }
+            }
+        }
+        #endregion
+
+        #region Page [SourceData - Heap CSV comparison source files]
+        private void Setup_SourceData_HeapCSVComparison()
+        {
+            iSettings.Load( "PG_SourceData_CompareCSV_Files", iPG_SourceData_CompareCSV_Files );
+        }
+
+        private void iPG_SourceData_CompareCSV_PageClosedFromButtonNext( SymWizardPageTransitionEvent aEventArgs )
+        {
+            // Check we have at least one valid file.
+            if ( iPG_SourceData_CompareCSV_Files.FileNames.Count == 0 )
+            {
+                aEventArgs.SuggestedNewPage = iPG_SourceData_CompareCSV;
+            }
+            else
+            {
+                iSettings.Save( "PG_SourceData_CompareCSV_Files", iPG_SourceData_CompareCSV_Files );
+                iEngine.ComparisonEngineCSV.SourceFileNames = iPG_SourceData_CompareCSV_Files.FileNames;
+                aEventArgs.SuggestedNewPage = iPG_OutputToDirectory;
+            }
+        }
+        #endregion
+
+        #region Page [Cmn - Symbolics]
+        private void Setup_Cmn_Symbolics()
+		{
+            iPG301_DebugControl.Engine = iEngine.DebugEngine;
+		}
+
+        private void iPG301_AnalysisSymbolics_CloseFromNext( SymWizardPageTransitionEvent aEventArgs )
+		{
+            string errorText = string.Empty;
+            if ( iPG301_DebugControl.IsReadyToPrime( out errorText ) )
+            {
+                iPG301_DebugControl.Prime();
+
+                if ( iEngine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps )
+                {
+                    aEventArgs.SuggestedNewPage = iPG_OutputToFile;
+                }
+                else
+                {
+                    // If there is only one thread available, then there's no point
+                    // asking the user to pick it...
+                    int number = 0;
+                    bool okayToProceed = SetDataSourceFromFirstAvailableThread( out number );
+                    if ( okayToProceed && number == 1 )
+                    {
+                        aEventArgs.SuggestedNewPage = iPG_Final;
+                    }
+                    else
+                    {
+                        aEventArgs.SuggestedNewPage = iPG_Cmn_Filters;
+                    }
+                }
+
+                // Also save debug engine configuration
+                iPG301_DebugControl.XmlSettingsSave();
+            }
+            else
+            {
+                MessageBox.Show( errorText, "Error" );
+                aEventArgs.SuggestedNewPage = iPG_Cmn_Symbolics;
+            }
+		}
+		#endregion
+
+        #region Page [Cmn - Heap thread filter]
+        private void Setup_Cmn_Filters()
+		{
+		}
+
+        private void iPG302_Cmn_Filters_CloseFromNext( SymWizardPageTransitionEvent aEventArgs )
+		{
+            if ( SetDataSourceFromFirstAvailableThread() )
+            {
+                // Clear any error
+                iErrorProvider.SetError( iPG302_Combo_Filter, string.Empty );
+
+                // Decide where to go next...
+                aEventArgs.SuggestedNewPage = iPG_Final;
+            }
+            else
+            {
+                iErrorProvider.SetError( iPG302_Combo_Filter, "No thread's were detected. Is the log corrupt?" );
+                aEventArgs.SuggestedNewPage = iPG_Cmn_Filters;
+            }
+		}
+		#endregion
+
+		#region Page [Output - Directory]
+        private void Setup_Output_Directory()
+		{
+            iSettings.Load( "Wizard", iPG_OutputToDirectory_FB );
+		}
+
+        private void Setup_Output_Directory_Dynamic()
+        {
+            iHeader_OutputToDirectory.Title = "Save CSV Comparsion Reports";
+            iHeader_OutputToDirectory.Description += "Microsoft Excel comparison reports";
+        }
+
+        private void iPG_OutputToDirectory_CloseFromNext( SymWizardPageTransitionEvent aEventArgs )
+		{
+            if ( !iPG_OutputToDirectory_FB.IsValid )
+            {
+                aEventArgs.SuggestedNewPage = iPG_OutputToDirectory;
+            }
+            else
+            {
+                string dir = iPG_OutputToDirectory_FB.EntityName;
+                iEngine.ComparisonEngineCSV.OutputDirectory = dir;
+                iSettings.Save( "Wizard", iPG_OutputToDirectory_FB );
+                aEventArgs.SuggestedNewPage = iPG_Final;
+            }
+		}
+		#endregion
+
+        #region Page [Output - File]
+        private void Setup_Output_File()
+        {
+            iSettings.Load( "Wizard", iPG_OutputToFile_FB );
+        }
+
+        private void Setup_Output_File_Dynamic()
+        {
+            if ( iEngine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps )
+            {
+                iHeader_OutputToFile.Title = "Save Heap Dump Comparison to Microsoft Excel";
+                iHeader_OutputToFile.Description += "Microsoft Excel comparison report";
+            }
+        }
+
+        private void iPG500_Comparison_Output_CloseFromNext( SymWizardPageTransitionEvent aEventArgs )
+        {
+            if ( iPG_OutputToFile_FB.IsValid )
+            {
+                iSettings.Save( "Wizard", iPG_OutputToFile_FB );
+                //
+                if ( iEngine.OperationType == HeapWizardEngine.TOperationType.EOperationTypeCompareHeapDumps )
+                {
+                    iEngine.ComparisonEngineData.OutputFileName = iPG_OutputToFile_FB.EntityName;
+                }
+                //
+                aEventArgs.SuggestedNewPage =  iPG_Final;
+            }
+            else
+            {
+                aEventArgs.SuggestedNewPage =  iPG_OutputToFile;
+            }
+        }
+        #endregion
+
+        #endregion
+
+        #region Internal methods
+        private bool SetDataSourceFromFirstAvailableThread()
+        {
+            int number;
+            return SetDataSourceFromFirstAvailableThread( out number );
+        }
+
+        private bool SetDataSourceFromFirstAvailableThread( out int aNumberOfDataSources )
+        {
+            bool okayToProceed = false;
+
+            // Must be at least one thread selected
+            DataSource dataSource = (DataSource) iPG302_Combo_Filter.SelectedItem;
+            if ( dataSource == null || iPG302_Combo_Filter.Items.Count == 0 )
+            {
+                // Can't do anything at this point... Let a later page
+                // handle this scenario.
+                aNumberOfDataSources = 0;
+            }
+            else
+            {
+                aNumberOfDataSources = iPG302_Combo_Filter.Items.Count;
+                iEngine.AnalysisEngine.DataSource = dataSource;
+                
+                // Save setting for filter thread
+                iSettings[ "Wizard", iPG302_Combo_Filter.Name ] = iPG302_Combo_Filter.Text;
+
+                // Good to go
+                okayToProceed = true;
+            }
+
+            return okayToProceed;
+        }
+
+        private void SeedAnalysisFiltersAfterDataSourceScan( DataSourceCollection aSources, ComboBox aCombo )
+        {
+            // Thread filtering - seed with detected threads
+            aCombo.BeginUpdate();
+            aCombo.Items.Clear();
+            foreach ( DataSource source in aSources )
+            {
+                bool allowSource = true;
+                bool containsErrors = CheckSourceForErrors( source, out allowSource );
+                if ( !containsErrors || allowSource )
+                {
+                    aCombo.Items.Add( source );
+                }
+            }
+
+            // Make sure something is selected
+            if ( aCombo.Items.Count > 0 )
+            {
+                iErrorProvider.SetError( aCombo, string.Empty );
+
+                int selectedThreadIndex = 0;
+
+                // If the user has picked a thread previously, try to select the same one
+                // again this time.
+                string lastSelectedThread = iSettings[ "Wizard", aCombo.Name ];
+                if ( lastSelectedThread.Length > 0 )
+                {
+                    int index = aSources.IndexOf( lastSelectedThread );
+                    if ( index >= 0 )
+                    {
+                        selectedThreadIndex = index;
+                    }
+                }
+
+                // Now pick the thread...
+                aCombo.SelectedIndex = selectedThreadIndex;
+            }
+            else
+            {
+                iErrorProvider.SetError( aCombo, "No thread's were detected. Is the log corrupt?" );
+            }
+
+            aCombo.Enabled = ( aCombo.Items.Count > 1 );
+            aCombo.EndUpdate();
+        }
+
+        private bool CheckSourceForErrors( DataSource aSource, out bool aAllowSourceAnyway )
+        {
+            aAllowSourceAnyway = false;
+            string description = string.Empty;
+            //
+            bool errorsDetected = aSource.ErrorsDetected( out description );
+            if ( errorsDetected )
+            {
+                StringBuilder msg = new StringBuilder();
+                msg.Append( "File: " + aSource.FileName );
+                msg.Append( System.Environment.NewLine );
+                msg.Append( "Thread: " + aSource.ThreadName );
+                msg.Append( System.Environment.NewLine );
+                msg.Append( System.Environment.NewLine );
+                msg.Append( description );
+                msg.Append( System.Environment.NewLine );
+                msg.Append( "You are recommended to save the heap data to zip and contact" );
+                msg.Append( "your support provider." );
+                msg.Append( System.Environment.NewLine );
+                msg.Append( System.Environment.NewLine );
+                msg.Append( "Do you want to allow this data anyway?" );
+                //
+                string title = string.Format( "Errors Detected - {0}", aSource.ThreadName );
+                DialogResult result = MessageBox.Show( msg.ToString(), title, MessageBoxButtons.YesNo );
+                aAllowSourceAnyway = ( result == DialogResult.Yes );
+            }
+            //
+            return errorsDetected;
+        }
+
+        private static DataSource DataSourceFromFilterCombo( ComboBox aCombo )
+        {
+            DataSource ret = null;
+            //
+            int index = aCombo.SelectedIndex;
+            if ( index >= 0 && index < aCombo.Items.Count )
+            {
+                object obj = aCombo.Items[ index ];
+                if ( obj is DataSource )
+                {
+                    ret = (DataSource) obj;
+                }
+            }
+            //
+            return ret;
+        }
+
+        private static string ThreadNameFromFilterCombo( ComboBox aCombo )
+        {
+            string ret = string.Empty;
+            //
+            DataSource ds = DataSourceFromFilterCombo( aCombo );
+            if ( ds != null )
+            {
+                ret = ds.ThreadName;
+            }
+            //
+            return ret;
+        }
+        #endregion
+
+        #region Data members
+        private readonly HeapWizardEngine iEngine;
+		private readonly XmlSettings iSettings;
+		#endregion
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/Graphical/Wizard/HASetupWizard.resx	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="header4.Description" xml:space="preserve">
+    <value>The heap analyser/viewer can graphically display the data colleced using MemSpy. MemSpy is a target-hw (console or GUI) application that can capture static snapshots of user or kernel heap data. The captured data can be analysed and then displayed graphically, or it can be exported as cross-linked HTML for display in a web browser (FireFox recommended).</value>
+  </data>
+  <data name="iPG_SourceData_CompareCSV_Files.FileNames" mimetype="application/x-microsoft.net.object.binary.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAEAQAAAH9TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5
+        c3RlbS5TdHJpbmcsIG1zY29ybGliLCBWZXJzaW9uPTIuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVi
+        bGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24GAAAI
+        CAkCAAAAAAAAAAAAAAARAgAAAAEAAAAKCw==
+</value>
+  </data>
+  <metadata name="iErrorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/HAUI.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.ComponentModel;
+using System.Windows.Forms;
+using SymbianUtils.Tracer;
+using SymbianUtils.Settings;
+using SymbianUtils.FileSystem.Utilities;
+using HeapLib;
+using HeapAnalyser.Engine;
+using HeapAnalyser.Engine.Types;
+
+namespace HeapAnalyser.UIs
+{
+	public abstract class HAUI : ITracer
+	{
+		#region Constructors
+        protected HAUI( string[] aArgs, XmlSettings aSettings, HeapWizardEngine aEngine, ITracer aTracer )
+		{
+            iArgs = aArgs;
+            iSettings = aSettings;
+            iEngine = aEngine;
+            iTracer = aTracer;
+		}
+		#endregion
+
+        #region Framework API
+        public abstract bool IsAppropriateUI
+        {
+            get;
+        }
+
+        public abstract Form PrepareInitialForm();
+
+        public abstract Form HandleFormClosed( object aSender, EventArgs aArgs );
+        #endregion
+
+        #region Properties
+        protected string[] Args
+        {
+            get { return iArgs; }
+        }
+
+        protected XmlSettings Settings
+        {
+            get { return iSettings; }
+        }
+
+        protected HeapWizardEngine Engine
+        {
+            get { return iEngine; }
+        }
+        #endregion
+
+		#region Event handlers
+		#endregion
+
+        #region ITracer Members
+        public void Trace( string aMessage )
+        {
+            iTracer.Trace( aMessage );
+        }
+
+        public void Trace( string aFormat, params object[] aParams )
+        {
+            string text = string.Format( aFormat, aParams );
+            Trace( text );
+        }
+        #endregion
+
+		#region Data members
+        private readonly string[] iArgs;
+		private readonly XmlSettings iSettings;
+		private readonly HeapWizardEngine iEngine;
+        private readonly ITracer iTracer;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/UIs/HAUIManager.cs	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,202 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+*
+* Redistribution and use in source and binary forms, with or without
+* modification, are permitted provided that the following conditions are met:
+*
+* - Redistributions of source code must retain the above copyright notice,
+*   this list of conditions and the following disclaimer.
+* - Redistributions in binary form must reproduce the above copyright notice,
+*   this list of conditions and the following disclaimer in the documentation
+*   and/or other materials provided with the distribution.
+* - Neither the name of Nokia Corporation nor the names of its contributors
+*   may be used to endorse or promote products derived from this software
+*   without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+* POSSIBILITY OF SUCH DAMAGE.
+* 
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+using System;
+using System.IO;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+using System.Text;
+using SymbianUtils.Tracer;
+using SymbianUtils.Settings;
+using SymbianUtils.FileSystem.Utilities;
+using SymbianUtils.PluginManager;
+using SymbianUtilsUi.Dialogs;
+using HeapLib;
+using HeapUiLib.Forms;
+using HeapAnalyser.Engine;
+using HeapAnalyser.Engine.Types;
+using HeapAnalyser.Exceptions;
+
+namespace HeapAnalyser.UIs
+{
+    public class HAUIManager : ApplicationContext, ITracer
+	{
+		#region Constructors
+        public HAUIManager( string[] aArgs )
+		{
+			// Create settings
+            iSettings = new XmlSettings( KHASettingsFileName );
+			iSettings.Restore();
+
+			// Create engine
+            iEngine = new HeapWizardEngine( Application.StartupPath, aArgs );
+
+            // Find UIs from this assembly
+            iUIs.LoadFromCallingAssembly( new object[] { aArgs, iSettings, iEngine, this } );
+        
+            // Listen to when the application exits so that we can save the settings
+            Application.ApplicationExit += new EventHandler( Application_ApplicationExit );
+        }
+		#endregion
+
+		#region API
+        public int Run()
+        {
+            int err = HAUIException.KErrCommandLineNone;
+            //
+            try
+            {
+                // Find appropriate UI to run.
+                HAUI uiToRun = null;
+                //
+                foreach ( HAUI ui in iUIs )
+                {
+                    bool isHandler = ui.IsAppropriateUI;
+                    if ( isHandler )
+                    {
+                        uiToRun = ui;
+                        break;
+                    }
+                }
+
+                // We must have one UI
+                if ( uiToRun == null )
+                {
+                    throw new HAUIException( "Unable to find UI", HAUIException.KErrCommandLineUINotAvailable );
+                }
+
+                iRunningUI = uiToRun;
+
+                // Request that the UI create a form.
+                Form mainForm = iRunningUI.PrepareInitialForm();
+                base.MainForm = mainForm;
+
+                // Start our message loop if we received a main form
+                if ( base.MainForm != null )
+                {
+                    Application.Run( this );
+                }
+            }
+            catch ( HAUIException cmdLineException )
+            {
+                err = cmdLineException.ErrorCode;
+                //
+                Trace( "[HA Cmd] " + cmdLineException.Message + " " + cmdLineException.StackTrace );
+            }
+            catch ( Exception generalException )
+            {
+                err = HAUIException.KErrCommandLineGeneral;
+                //
+                Trace( "[HA Cmd] " + generalException.Message + " " + generalException.StackTrace );
+            }
+            //
+            return err;
+        }
+		#endregion
+
+		#region Event handlers
+		protected override void OnMainFormClosed( object aSender, EventArgs aArgs )
+		{
+            SymbianUtils.SymDebug.SymDebugger.Assert( iRunningUI != null );
+            
+            // Inform "UI" that another form has been closed. This returns us another
+            // new form if one is needed
+            base.MainForm = iRunningUI.HandleFormClosed( aSender, aArgs );
+
+            // Show the next form if needed
+            if ( base.MainForm != null )
+            {
+                base.MainForm.Show();
+            }
+            else
+            {
+                // Otherwise exit
+                base.OnMainFormClosed( aSender, aArgs );
+                Application.Exit();
+            }
+		}
+
+        private void Application_ApplicationExit( object aSender, EventArgs aArgs )
+        {
+            SaveSettings();
+        }
+        #endregion
+
+        #region Internal constants
+        private const string KHASettingsFileName = "HeapWizard.xml";
+        #endregion
+
+        #region Internal methods
+		private void SaveSettings()
+		{
+			try
+			{
+				if	( iSettings != null )
+				{
+					iSettings.Store();
+				}
+			}
+			catch( Exception )
+			{
+			}
+		}
+        #endregion
+
+        #region ITracer Members
+        public void Trace( string aMessage )
+        {
+            System.Diagnostics.Debug.WriteLine( aMessage );
+        }
+
+        public void Trace( string aFormat, params object[] aParams )
+        {
+            string text = string.Format( aFormat, aParams );
+            Trace( text );
+        }
+        #endregion
+
+        #region Data members
+        private readonly XmlSettings iSettings;
+		private readonly HeapWizardEngine iEngine;
+        private PluginManager<HAUI> iUIs = new PluginManager<HAUI>( 2 );
+        private HAUI iRunningUI = null;
+		#endregion
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysperfana/heapanalyser/UI/bin/Debug/SupportingLibraries.txt	Tue Jun 15 12:47:20 2010 +0300
@@ -0,0 +1,43 @@
+ZedGraph (c) John Champion
+==========================
+http://zedgraph.org/wiki/index.php?title=ZedGraph_License
+
+ZedGraph is licensed under the Lesser or Library General Public License. 
+
+
+
+
+
+
+
+XPTable (c) Mathew Hall
+=======================
+http://www.codeproject.com/cs/miscctrl/XPTable.asp
+http://sourceforge.net/projects/xptable/
+
+/*
+ * Copyright © 2005, Mathew Hall
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ *
+ *    - Redistributions of source code must retain the above copyright notice, 
+ *      this list of conditions and the following disclaimer.
+ * 
+ *    - Redistributions in binary form must reproduce the above copyright notice, 
+ *      this list of conditions and the following disclaimer in the documentation 
+ *      and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
+ * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
+ * OF SUCH DAMAGE.
+ */
+