浏览代码

fix allocation size

Samuel Thibault 10 年之前
父节点
当前提交
1d557e8a9f
共有 1 个文件被更改,包括 1 次插入1 次删除
  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])));
 	}