Browse Source

fix allocation size

Samuel Thibault 10 years ago
parent
commit
1d557e8a9f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/main/execute_schedule.c

+ 1 - 1
tests/main/execute_schedule.c

@@ -78,7 +78,7 @@ int main(int argc, char **argv)
 
 	for (n = 0; n < N; n++)
 	{
-		t[n] = malloc(1<<20);
+		t[n] = malloc((1<<20) * sizeof(*(t[n])));
 		starpu_variable_data_register(&h[n], STARPU_MAIN_RAM, (uintptr_t) &t[n], (1<<20) * sizeof(*(t[n])));
 	}