Parcourir la source

Fix counting allocated memory

Samuel Thibault il y a 10 ans
Parent
commit
501de79951
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/datawizard/malloc.c

+ 1 - 1
src/datawizard/malloc.c

@@ -92,7 +92,7 @@ int starpu_malloc_flags(void **A, size_t dim, int flags)
 
 	if (flags & STARPU_MALLOC_COUNT)
 	{
-		if (_starpu_memory_manager_can_allocate_size(dim, STARPU_MAIN_RAM) == 0)
+		while (_starpu_memory_manager_can_allocate_size(dim, STARPU_MAIN_RAM) == 0)
 		{
 			size_t freed;
 			size_t reclaim = 2 * dim;