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:
Marco Costalba
2011-04-24 18:46:26 +01:00
parent fecefbb99c
commit 339e1b49f6
5 changed files with 40 additions and 19 deletions

View File

@@ -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; }