Selaa lähdekoodia

fix initialization of worker_set for thread-per-stream case

Samuel Thibault 8 vuotta sitten
vanhempi
commit
0075a7f1f9
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/core/topology.c

+ 1 - 1
src/core/topology.c

@@ -1069,7 +1069,7 @@ _starpu_init_machine_config(struct _starpu_machine_config *config, int no_mp_con
 			if(th_per_stream)
 			{
 				/* Just one worker in the set */
-				config->workers[worker_idx].set = (struct _starpu_worker_set *)malloc(sizeof(struct _starpu_worker_set));
+				config->workers[worker_idx].set = (struct _starpu_worker_set *)calloc(1, sizeof(struct _starpu_worker_set));
 				config->workers[worker_idx].set->workers = &config->workers[worker_idx];
 			}
 			else