Преглед на файлове

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

Samuel Thibault преди 12 години
родител
ревизия
c44a90ff25
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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 */
 		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");
 			if (try_to_reuse_mem_chunk(mc, node, replicate, 1))