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); }
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); }
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); }