瀏覽代碼

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))