summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_affinity.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp_affinity.cpp')
-rw-r--r--openmp/runtime/src/kmp_affinity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp
index d9ff4e62200..32a04465fe8 100644
--- a/openmp/runtime/src/kmp_affinity.cpp
+++ b/openmp/runtime/src/kmp_affinity.cpp
@@ -4504,11 +4504,11 @@ void __kmp_balanced_affinity( int tid, int nthreads )
} else { // nthreads > __kmp_ncores
// Array to save the number of processors at each core
- int nproc_at_core[ ncores ];
+ int* nproc_at_core = (int*)KMP_ALLOCA(sizeof(int)*ncores);
// Array to save the number of cores with "x" available processors;
- int ncores_with_x_procs[ nth_per_core + 1 ];
+ int* ncores_with_x_procs = (int*)KMP_ALLOCA(sizeof(int)*(nth_per_core+1));
// Array to save the number of cores with # procs from x to nth_per_core
- int ncores_with_x_to_max_procs[ nth_per_core + 1 ];
+ int* ncores_with_x_to_max_procs = (int*)KMP_ALLOCA(sizeof(int)*(nth_per_core+1));
for( int i = 0; i <= nth_per_core; i++ ) {
ncores_with_x_procs[ i ] = 0;
OpenPOWER on IntegriCloud