Przeglądaj źródła

unregister pointer when reusing memory chunk

Corentin Salingue 8 lat temu
rodzic
commit
4448408f1f
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/datawizard/memalloc.c

+ 2 - 0
src/datawizard/memalloc.c

@@ -442,6 +442,8 @@ static void reuse_mem_chunk(unsigned node, struct _starpu_data_replicate *new_re
 	struct _starpu_data_replicate *old_replicate = mc->replicate;
 	if (old_replicate)
 	{
+		if (node == STARPU_MAIN_RAM)
+			_starpu_data_unregister_ram_pointer(old_replicate->handle);
 		old_replicate->allocated = 0;
 		old_replicate->automatically_allocated = 0;
 		old_replicate->initialized = 0;