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

@@ -105,6 +105,7 @@ public:
Thread& operator[](int threadID) { return threads[threadID]; }
void init_threads();
void exit_threads();
void init_hash_tables();
int min_split_depth() const { return minimumSplitDepth; }
int active_threads() const { return activeThreads; }