]> git.sesse.net Git - stockfish/commit
Reduce minimum memory requirement by 16MB
authorlucasart <lucas.braesch@gmail.com>
Tue, 5 Aug 2014 03:42:48 +0000 (11:42 +0800)
committerlucasart <lucas.braesch@gmail.com>
Tue, 5 Aug 2014 03:42:48 +0000 (11:42 +0800)
commit8b88ca901779524ef17cb26c1278cb54ea3be6ae
treefa213299dacf0664393d622a6f229687fcd07fe3
parent94fe366779e877e85e89ba5b536099658847fbcd
Reduce minimum memory requirement by 16MB
Stockfish allocates the default hash (32MB) in main(), before entering UCI::loop(). If there is not enough
memory, the program will crash even before UCI::loop() is entered and the GUI is given a change to specify a
lower Hash value.

This defective design could be resolved by doing a lazy allocation upon "isready" command, as the UCI protocol
guarantees that "isready" will be sent at least once before any search. But it's a bit cumbersome when using
Stockfish "manually" to have to remember to type "isready" everytime.

So leave the current design, but reduce the default hash to 16MB instread of 32MB. In order to perform such
quick searches (depth=13), there is no reason to use so much Hash anyway. Another benefit is to introduce a
bit of hash pressure in bench, which increases chances to detect rare bugs related to TT replacement, for
example.

This is not a functional change, although it obviously changes the bench.

bench 7461879
src/ucioption.cpp