Skip to content

Instantly share code, notes, and snippets.

@Seikilos
Created April 2, 2014 12:14
Show Gist options
  • Save Seikilos/9932931 to your computer and use it in GitHub Desktop.
Save Seikilos/9932931 to your computer and use it in GitHub Desktop.
// Replace LISMemoryComparer.MemoryComparerManager.SplitMemoryDumpLine(string DumpLine) with:
private static string[] SplitMemoryDumpLine(string DumpLine)
{
// Split by whitespace, skip whitespace
var lines = DumpLine.Trim().Split(' ');
var Result = new List<string>();
foreach (var line in lines)
{
if (string.IsNullOrEmpty(line) == false)
{
// if Result has already 4, then merge line
if (Result.Count == 4)
{
Result[3] += line;
}
else
{
Result.Add(line);
}
}
}
System.Diagnostics.Debug.WriteLine(DumpLine);
System.Diagnostics.Debug.Assert(Result.Count() == 4);
return Result.ToArray();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment