Forráskód Böngészése

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

Nathalie Furmento 12 éve
szülő
commit
cc8edb06c4
1 módosított fájl, 7 hozzáadás és 3 törlés
  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;