示例#1
0
        public void CanParseCSV()
        {
            VMMap  map           = new VMMap(100);
            string tempVMMapFile = "test.csv";

            File.Copy("Dumps\\VMMAP.csv", tempVMMapFile, true);
            Assert.IsTrue(File.Exists(tempVMMapFile));
            VMMapData lret = map.ParseVMMapFile("test.csv", bDelete: true);

            Assert.IsFalse(File.Exists(tempVMMapFile));
            Assert.AreEqual(1024 * 586096, lret.Reserved_DllBytes);
            Assert.AreEqual(1024 * 583724, lret.Committed_DllBytes);
            Assert.AreEqual(1024 * 132224, lret.Reserved_ManagedHeapBytes);
            Assert.AreEqual(1024 * 108200, lret.Committed_ManagedHeapBytes);
            Assert.AreEqual(1024 * 87464, lret.Reserved_HeapBytes);
            Assert.AreEqual(1024 * 72356, lret.Committed_HeapBytes);
            Assert.AreEqual(1024 * 72124, lret.Reserved_MappedFileBytes);
            Assert.AreEqual(1024 * 72124, lret.Committed_MappedFileBytes);
            Assert.AreEqual(1024 * 26952, lret.Reserved_ShareableBytes);
            Assert.AreEqual(1024 * 6396, lret.Committed_ShareableBytes);
            Assert.AreEqual(1024 * 40704, lret.Reserved_Stack);
            Assert.AreEqual(1024 * 4192, lret.Committed_Stack);
            Assert.AreEqual(1024 * 91736, lret.Reserved_PrivateBytes);
            Assert.AreEqual(1024 * 19220, lret.Committed_PrivateBytes);
            Assert.AreEqual(1024 * 32368, lret.Reserved_PageTable);
            Assert.AreEqual(1024 * 32368, lret.Committed_PageTable);
            Assert.AreEqual(1024 * 2083712, lret.LargestFreeBlockBytes);
        }
示例#2
0
 public static void SetMapper(VMMap mapEng)
 {
     mainMap = mapEng.GetMapControl;
     Markers = new GMapOverlay(mainMap, "Vehicle");
     mainMap.Overlays.Add(Markers);
     RoutesOverlay = new GMapOverlay(mainMap, "Routes");
     mainMap.Overlays.Add(RoutesOverlay);
     mainMap.MarkersEnabled = true;
     mainMap.Zoom           = mainMap.MaxZoom;
 }
示例#3
0
        public void CanMapLineData()
        {
            VMMap     map  = new VMMap(100);
            VMMapData data = new VMMapData();

            map.MapDataFromLine(data, Line);

            Assert.AreEqual(1024 * 72124, data.Reserved_MappedFileBytes);
            Assert.AreEqual(1024 * 72124, data.Committed_MappedFileBytes);
        }
示例#4
0
 private void InitializeComponent()
 {
     this.tableLayoutPanel1 = new TableLayoutPanel();
     this.chk_MapCompass    = new vCheckBox();
     this.VMMap             = new VMMap();
     this.tableLayoutPanel1.SuspendLayout();
     base.SuspendLayout();
     this.tableLayoutPanel1.BackgroundImage = Properties.Resources.nogps;
     this.tableLayoutPanel1.ColumnCount     = 1;
     this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f));
     this.tableLayoutPanel1.Controls.Add(this.chk_MapCompass, 0, 1);
     this.tableLayoutPanel1.Controls.Add(this.VMMap, 0, 0);
     this.tableLayoutPanel1.Dock     = DockStyle.Fill;
     this.tableLayoutPanel1.Location = new Point(0, 0);
     this.tableLayoutPanel1.Margin   = new Padding(0);
     this.tableLayoutPanel1.Name     = "tableLayoutPanel1";
     this.tableLayoutPanel1.RowCount = 2;
     this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100f));
     this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 22f));
     this.tableLayoutPanel1.Size                 = new Size(334, 460);
     this.tableLayoutPanel1.TabIndex             = 0;
     this.chk_MapCompass.BackColor               = Color.Transparent;
     this.chk_MapCompass.Dock                    = DockStyle.Fill;
     this.chk_MapCompass.Location                = new Point(3, 441);
     this.chk_MapCompass.Name                    = "chk_MapCompass";
     this.chk_MapCompass.Size                    = new Size(328, 16);
     this.chk_MapCompass.TabIndex                = 0;
     this.chk_MapCompass.Text                    = "Map Compass";
     this.chk_MapCompass.UseVisualStyleBackColor = false;
     this.chk_MapCompass.VIBlendTheme            = VIBLEND_THEME.VISTABLUE;
     this.chk_MapCompass.CheckedChanged         += new EventHandler(this.chk_MapCompass_CheckedChanged);
     this.VMMap.Dock          = DockStyle.Fill;
     this.VMMap.Location      = new Point(3, 3);
     this.VMMap.Name          = "VMMap";
     this.VMMap.Size          = new Size(328, 432);
     this.VMMap.TabIndex      = 1;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode       = AutoScaleMode.Font;
     this.BackColor           = Color.White;
     base.Controls.Add(this.tableLayoutPanel1);
     base.Margin = new Padding(0);
     base.Name   = "MapPanel2";
     base.Size   = new Size(334, 460);
     base.Load  += new EventHandler(this.MapPanel_Load);
     this.tableLayoutPanel1.ResumeLayout(false);
     base.ResumeLayout(false);
 }
示例#5
0
        public void Can_Match_Parts()
        {
            var matches = VMMap.SplitLine(Line);

            Assert.AreEqual(11, matches.Length);
            Assert.AreEqual("Mapped File", matches[0]);
            Assert.AreEqual("72124", matches[1]);
            Assert.AreEqual("72124", matches[2]);
            Assert.AreEqual("", matches[3]);
            Assert.AreEqual("368", matches[4]);
            Assert.AreEqual("", matches[5]);
            Assert.AreEqual("368", matches[6]);
            Assert.AreEqual("248", matches[7]);
            Assert.AreEqual("", matches[8]);
            Assert.AreEqual("86", matches[9]);
            Assert.AreEqual("17216", matches[10]);
        }
示例#6
0
        public void Can_Parse_ExistingFile_And_Do_Not_Delete_It_After_Parse()
        {
            string tempVMMapFile = "test.csv";

            File.Copy("Dumps\\VMMAP.csv", tempVMMapFile, true);

            VMMap map = new VMMap(tempVMMapFile);

            Assert.IsTrue(File.Exists(tempVMMapFile));

            VMMapData lret = map.GetMappingData();

            Assert.IsTrue(File.Exists(tempVMMapFile));

            File.Delete(tempVMMapFile);

            Assert.AreEqual(true, lret.HasValues);
            Assert.AreEqual(1024 * 2083712, lret.LargestFreeBlockBytes);
        }