瀏覽代碼

Fix reusing data from the allocation cache: the mc shouldn't be put on the mc_list, that will be handled by register_mem_chunk

Samuel Thibault 10 年之前
父節點
當前提交
d8ca14fa57
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/datawizard/memalloc.c

+ 3 - 3
src/datawizard/memalloc.c

@@ -448,10 +448,10 @@ static void reuse_mem_chunk(unsigned node, struct _starpu_data_replicate *new_re
 	/* mc->ops, mc->footprint and mc->interface should be
  	 * unchanged ! */
 
-	/* reinsert the mem chunk in the list of active memory chunks */
-	if (!is_already_in_mc_list)
+	/* remove the mem chunk from the list of active memory chunks, register_mem_chunk will put it back later */
+	if (is_already_in_mc_list)
 	{
-		_starpu_mem_chunk_list_push_back(mc_list[node], mc);
+		_starpu_mem_chunk_list_delete(mc);
 	}
 }