瀏覽代碼

tests/datawizard/allocate.c: test memory reclaim is working

Nathalie Furmento 12 年之前
父節點
當前提交
cc8edb06c4
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      tests/datawizard/allocate.c

+ 7 - 3
tests/datawizard/allocate.c

@@ -62,9 +62,13 @@ int main(int argc, char **argv)
 	ret = starpu_malloc((void **)&buffer3, 1*1024*512);
 	STARPU_CHECK_RETURN_VALUE_IS(ret, -ENOMEM, "starpu_malloc");
 
-#ifdef STARPU_DEVEL
-#warning we need to test the reclaim is working by calling starpu_free(buffer2) and re-trying to allocate buffer3
-#endif
+	starpu_free(buffer2);
+
+	ret = starpu_malloc((void **)&buffer3, 1*1024*512);
+	STARPU_CHECK_RETURN_VALUE(ret, "starpu_malloc");
+
+	starpu_free(buffer3);
+	starpu_free(buffer);
 
 	starpu_shutdown();
 	return 0;