Browse Source

tests/microbenchs/tasks_size_overhead.c: minor fixes

Nathalie Furmento 6 years ago
parent
commit
7e2c3ebe23
1 changed files with 3 additions and 3 deletions
  1. 3 3
      tests/microbenchs/tasks_size_overhead.c

+ 3 - 3
tests/microbenchs/tasks_size_overhead.c

@@ -1,7 +1,7 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
  *
  * Copyright (C) 2012-2013                                Inria
  * Copyright (C) 2012-2013                                Inria
- * Copyright (C) 2010-2013,2015-2017                      CNRS
+ * Copyright (C) 2010-2013,2015-2018                      CNRS
  * Copyright (C) 2010-2014,2016-2017                      Université de Bordeaux
  * Copyright (C) 2010-2014,2016-2017                      Université de Bordeaux
  *
  *
  * StarPU is free software; you can redistribute it and/or modify
  * StarPU is free software; you can redistribute it and/or modify
@@ -191,7 +191,7 @@ int main(int argc, char **argv)
 
 
 	/* Allocate data */
 	/* Allocate data */
 	for (buffer = 0; buffer < total_nbuffers; buffer++)
 	for (buffer = 0; buffer < total_nbuffers; buffer++)
-		buffers[buffer] = (float *) malloc(16*sizeof(float));
+		buffers[buffer] = (float *) calloc(16, sizeof(float));
 
 
 	tasks = (struct starpu_task *) calloc(1, ntasks*maxcpus*sizeof(struct starpu_task));
 	tasks = (struct starpu_task *) calloc(1, ntasks*maxcpus*sizeof(struct starpu_task));
 
 
@@ -253,7 +253,7 @@ int main(int argc, char **argv)
 				{
 				{
 					tasks[i].dyn_handles = malloc(nbuffers * sizeof(*data_handles));
 					tasks[i].dyn_handles = malloc(nbuffers * sizeof(*data_handles));
 					handles = tasks[i].dyn_handles;
 					handles = tasks[i].dyn_handles;
-					tasks[i].dyn_modes = malloc(nbuffers * sizeof(*(tasks[i].dyn_modes)));
+					tasks[i].dyn_modes = malloc(nbuffers * sizeof(tasks[i].dyn_modes[0]));
 					for (buffer = 0; buffer < nbuffers; buffer++)
 					for (buffer = 0; buffer < nbuffers; buffer++)
 						tasks[i].dyn_modes[buffer] = STARPU_R;
 						tasks[i].dyn_modes[buffer] = STARPU_R;
 				}
 				}