diff --git a/src/Lynx/Engine.cs b/src/Lynx/Engine.cs index b036ee2d6..67dc1b98d 100644 --- a/src/Lynx/Engine.cs +++ b/src/Lynx/Engine.cs @@ -73,8 +73,7 @@ public Engine(ChannelWriter engineWriter) _killerMoves[i] = new Move[3]; } - (int ttLength, _ttMask) = TranspositionTableExtensions.CalculateLength(Configuration.EngineSettings.TranspositionTableSize); - _tt = GC.AllocateArray(ttLength, pinned: true); + InitializeTT(); #if !DEBUG // Temporary channel so that no output is generated @@ -113,7 +112,7 @@ private void WarmupEngine() private void ResetEngine() { - Array.Clear(_tt); + InitializeTT(); // Clear histories for (int i = 0; i < 12; ++i)