mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Don't allocate MAX_THREADS hash tables if not necessary
This prevent crashing on mobile devices with limited RAM, currently with MAX_THREADS = 32 we would need 44MB that could be too much for a poor cellphone. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -85,7 +85,7 @@ namespace {
|
||||
|
||||
/// MaterialInfoTable c'tor and d'tor allocate and free the space for Endgames
|
||||
|
||||
void MaterialInfoTable::init() { Base::init(); funcs = new Endgames(); }
|
||||
void MaterialInfoTable::init() { Base::init(); if (!funcs) funcs = new Endgames(); }
|
||||
MaterialInfoTable::~MaterialInfoTable() { delete funcs; }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user