]> git.sesse.net Git - stockfish/commit
Fix a possible overflow in TT resize
authorMarco Costalba <mcostalba@gmail.com>
Sat, 17 Jan 2015 08:04:25 +0000 (09:04 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 17 Jan 2015 20:42:47 +0000 (21:42 +0100)
commit595fc342cf4a039cc59ca6adec5025d14201714b
tree6e1814f9d7c5717009dd0239a0ad07bc8c6963d8
parent58fdb84b0df76a951da40dc10a6db018ed0927fb
Fix a possible overflow in TT resize

On platforms where size_t is 32 bit, we
can have an overflow in this expression:

(mbSize * 1024 * 1024)

Fix it setting max hash size of 2GB on platforms
where size_t is 32 bit.

A small rename while there: now struct Cluster
is definied inside class TranspositionTable so
we should drop the redundant TT prefix.

No functional change.
src/tt.cpp
src/tt.h
src/ucioption.cpp