Skip to content

Commit

Permalink
Revert Array.Clear(_tt), in case that's the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
eduherminio committed Sep 10, 2024
1 parent d57344e commit f18aa0b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Lynx/Engine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ public Engine(ChannelWriter<string> engineWriter)
_killerMoves[i] = new Move[3];
}

(int ttLength, _ttMask) = TranspositionTableExtensions.CalculateLength(Configuration.EngineSettings.TranspositionTableSize);
_tt = GC.AllocateArray<TranspositionTableElement>(ttLength, pinned: true);
InitializeTT();

#if !DEBUG
// Temporary channel so that no output is generated
Expand Down Expand Up @@ -113,7 +112,7 @@ private void WarmupEngine()

private void ResetEngine()
{
Array.Clear(_tt);
InitializeTT();

// Clear histories
for (int i = 0; i < 12; ++i)
Expand Down

0 comments on commit f18aa0b

Please sign in to comment.