Procházet zdrojové kódy

Always free RAM data immediately when STARPU_USE_ALLOCATION_CACHE is not defined

Samuel Thibault před 10 roky
rodič
revize
e09ed840c2
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      src/datawizard/memalloc.c

+ 5 - 1
src/datawizard/memalloc.c

@@ -1138,7 +1138,11 @@ void _starpu_request_mem_chunk_removal(starpu_data_handle_t handle, struct _star
 	 * STARPU_USE_ALLOCATION_CACHE is not enabled, as we
 	 * wouldn't even re-use these allocations!
 	 */
-	if (handle->ops->dontcache || (starpu_node_get_kind(node) == STARPU_CPU_RAM && limit_cpu_mem < 0))
+	if (handle->ops->dontcache || (starpu_node_get_kind(node) == STARPU_CPU_RAM
+#ifdef STARPU_USE_ALLOCATION_CACHE
+				&& limit_cpu_mem < 0
+#endif
+				))
 	{
 		/* Free data immediately */
 		free_memory_on_node(mc, node);