Przeglądaj źródła

after r8987, mem chunks can now not have a data pointer

Samuel Thibault 12 lat temu
rodzic
commit
c44a90ff25
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/datawizard/memalloc.c

+ 1 - 1
src/datawizard/memalloc.c

@@ -504,7 +504,7 @@ static unsigned try_to_find_reusable_mem_chunk(unsigned node, starpu_data_handle
 		 * now */
 		 * now */
 		next_mc = _starpu_mem_chunk_list_next(mc);
 		next_mc = _starpu_mem_chunk_list_next(mc);
 
 
-		if (mc->data->is_not_important && (mc->footprint == footprint))
+		if ((!mc->data || mc->data->is_not_important) && (mc->footprint == footprint))
 		{
 		{
 //			fprintf(stderr, "found a candidate ...\n");
 //			fprintf(stderr, "found a candidate ...\n");
 			if (try_to_reuse_mem_chunk(mc, node, replicate, 1))
 			if (try_to_reuse_mem_chunk(mc, node, replicate, 1))