浏览代码

Do not warn when MALLOC_PERTURB_ is set to empty or zero

Samuel Thibault 10 年之前
父节点
当前提交
dac20b3384
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/core/workers.c

+ 3 - 2
src/core/workers.c

@@ -1139,8 +1139,9 @@ int starpu_initialize(struct starpu_conf *user_conf, int *argc, char ***argv)
 #ifdef STARPU_SIMGRID
 	/* Warn when the lots of stacks malloc()-ated by simgrid for transfer
 	 * processes will take a long time to get initialized */
-	if (starpu_getenv("MALLOC_PERTURB_"))
-		_STARPU_DISP("Warning: MALLOC_PERTURB_ is set, this makes simgrid runs very slow\n");
+	char *perturb = starpu_getenv("MALLOC_PERTURB_");
+	if (perturb && perturb[0] && atoi(perturb) != 0)
+		_STARPU_DISP("Warning: MALLOC_PERTURB_ is set to non-zero, this makes simgrid runs very slow\n");
 #else
 #ifdef __GNUC__
 #ifndef __OPTIMIZE__