MINOR: config: make MAX_PROCS configurable at build time
For some embedded systems, it's pointless to have 32- or even 64- large
arrays of processes when it's known that much fewer processes will be
used in the worst case. Let's introduce this MAX_PROCS define which
contains the highest number of processes allowed to run at once. It
still defaults to LONGBITS but may be lowered.
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 1afb49c..d7d18c6 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -2296,7 +2296,7 @@
mask >>= global.nbthread;
}
- for (nbproc = 0; nbproc < LONGBITS; nbproc++) {
+ for (nbproc = 0; nbproc < MAX_PROCS; nbproc++) {
if (!bind_conf->bind_proc || (bind_conf->bind_proc & (1UL << nbproc)))
bind_conf->bind_thread[nbproc] = new_mask;
}