Browse Source

data_unregister: look out for replicate references leaks

Samuel Thibault 4 years ago
parent
commit
91eb27d979
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/datawizard/interfaces/data_interface.c

+ 2 - 0
src/datawizard/interfaces/data_interface.c

@@ -1032,6 +1032,7 @@ retry_busy:
 	for (node = 0; node < STARPU_MAXNODES; node++)
 	{
 		struct _starpu_data_replicate *local = &handle->per_node[node];
+		STARPU_ASSERT(!local->refcnt);
 		if (local->allocated)
 		{
 			_starpu_data_unregister_ram_pointer(handle, node);
@@ -1048,6 +1049,7 @@ retry_busy:
 		for (worker = 0; worker < nworkers; worker++)
 		{
 			struct _starpu_data_replicate *local = &handle->per_worker[worker];
+			STARPU_ASSERT(!local->refcnt);
 			/* free the data copy in a lazy fashion */
 			if (local->allocated && local->automatically_allocated)
 				_starpu_request_mem_chunk_removal(handle, local, starpu_worker_get_memory_node(worker), size);