Retire SearchStack sstack[] from SplitPoint
authorMarco Costalba <mcostalba@gmail.com>
Fri, 18 Feb 2011 14:44:02 +0000 (15:44 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 18 Feb 2011 15:54:49 +0000 (16:54 +0100)
commit823a5918e73e47585cdf3c4504d9f7e85e18b7cc
tree477fb9010d88ae83f46e58a45e79e1ef1c750015
parent932ae761c6e3fd3e9b202283379e487a5c187989
Retire SearchStack sstack[] from SplitPoint

Use a local variable instead. To make it work we need to
correctly init next ply search stack at the beginning of the
search because now that ss is allocated on the stack instead
of on the global storage it contains garbage.

As a side effect we can peform a fast search stack
init in id_loop().

With this patch size of SplitPoint goes from 71944 to 136 bytes,
and consequently size of Thread goes from 575568 to 1104 bytes.

Finally the size of ThreadsManager that contains all the thread
info goes from 9209248 to just 17824 bytes !!

No functional change also in faked split.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp
src/thread.h