hlsf error is solving
This commit is contained in:
@@ -62,6 +62,42 @@ namespace StgSharp.HighPerformance.Memory
|
||||
}
|
||||
}
|
||||
|
||||
public void DumpPositionChain(bool singleStep = false, int maxCount = 4096)
|
||||
{
|
||||
lock (_lock)
|
||||
{
|
||||
try
|
||||
{
|
||||
Entry* cur = _spareMemory;
|
||||
int cnt = 0;
|
||||
if (cur != null) {
|
||||
cur = cur->NextNear;
|
||||
}
|
||||
Console.WriteLine(EntryToString(_spareMemory));
|
||||
while (cur != null && cur != _spareMemory && cnt < maxCount)
|
||||
{
|
||||
Console.WriteLine(EntryToString(cur));
|
||||
cnt++;
|
||||
if (singleStep) {
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
cur = cur->NextNear;
|
||||
}
|
||||
if (cur == _spareMemory)
|
||||
{
|
||||
Console.WriteLine("(reached sentinel)");
|
||||
} else if (cnt >= maxCount) {
|
||||
Console.WriteLine("(stopped at maxCount)");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"[DumpPositionChain-forward] Exception: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<string> ShowEntryLayout()
|
||||
{
|
||||
lock (_lock)
|
||||
@@ -80,8 +116,8 @@ namespace StgSharp.HighPerformance.Memory
|
||||
private static string EntryToString(Entry* e)
|
||||
{
|
||||
BucketNode* b = (BucketNode*)e->Position;
|
||||
return $"{(ulong)e->PreviousNear}<-- Position{(ulong)e} Bucket:{{{(ulong)e->Position},{e->Level},{e->Size}}} -->{(ulong)e->NextNear}";
|
||||
return $"{(ulong)e->PreviousNear}<-prev- Position:{(ulong)e} Bucket:{{{(ulong)e->Position},{e->Level},{e->Size}}} -next->{(ulong)e->NextNear}";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user