|
@@ -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);
|
|
|
}
|
|
|
}
|
|
|
|