|
@@ -265,7 +265,7 @@ static int lock_all_subtree(starpu_data_handle_t handle)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
-static unsigned may_free_subtree(starpu_data_handle_t handle, unsigned node)
|
|
|
+static unsigned may_free_handle(starpu_data_handle_t handle, unsigned node)
|
|
|
{
|
|
|
|
|
|
uint32_t refcnt = _starpu_get_data_refcnt(handle, node);
|
|
@@ -284,6 +284,15 @@ static unsigned may_free_subtree(starpu_data_handle_t handle, unsigned node)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ return 1;
|
|
|
+}
|
|
|
+
|
|
|
+static unsigned may_free_subtree(starpu_data_handle_t handle, unsigned node)
|
|
|
+{
|
|
|
+ if (!may_free_handle(handle, node))
|
|
|
+ return 0;
|
|
|
+
|
|
|
|
|
|
unsigned child;
|
|
|
for (child = 0; child < handle->nchildren; child++)
|
|
@@ -560,6 +569,10 @@ int starpu_data_can_evict(starpu_data_handle_t handle, unsigned node, enum starp
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
+ if (!may_free_handle(handle, node))
|
|
|
+
|
|
|
+ return 0;
|
|
|
+
|
|
|
return 1;
|
|
|
}
|
|
|
|