From 10b11da91368b520532a010a4287dacfce020b7d Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 25 Apr 2016 09:01:33 +0200 Subject: [PATCH] Restore back DTZ_list size limit We will remove it when we will have a better understanding of the code base, for now just stick to the original functionality. --- src/syzygy/tbprobe.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/syzygy/tbprobe.cpp b/src/syzygy/tbprobe.cpp index d360585d..0ce7663f 100644 --- a/src/syzygy/tbprobe.cpp +++ b/src/syzygy/tbprobe.cpp @@ -1511,6 +1511,16 @@ int probe_dtz_table(const Position& pos, int wdl, int *success) dtz.entry = entry; DTZ_list.push_front(dtz); + + // Keep list size within 64 entries + // FIXME remove it when we will know what we are doing + if (DTZ_list.size() > 64) + { + if (DTZ_list.back().entry) + free_dtz_entry(DTZ_list.back()); + + DTZ_list.pop_back(); + } } }