File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2793,7 +2793,12 @@ HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_insert_misc_object(hwloc_topology_t to
2793
2793
*
2794
2794
* \return The allocated object on success.
2795
2795
* \return \c NULL on error.
2796
- */
2796
+ *
2797
+ * \note The only way to free this object is to pass it to hwloc_topology_insert_group_object().
2798
+ * If properly inserted, it will be freed when the entire topology is freed.
2799
+ * If insertion failed (e.g. \c NULL or empty CPU and node-sets),
2800
+ * it is freed before returning the error.
2801
+ */
2797
2802
HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_alloc_group_object (hwloc_topology_t topology );
2798
2803
2799
2804
/** \brief Add more structure to the topology by adding an intermediate Group
@@ -2833,6 +2838,8 @@ HWLOC_DECLSPEC hwloc_obj_t hwloc_topology_alloc_group_object(hwloc_topology_t to
2833
2838
* hence the existing objects may get reordered (including PUs and NUMA nodes),
2834
2839
* and their logical indexes may change.
2835
2840
*
2841
+ * \note If the insertion fails, the input group object is freed.
2842
+ *
2836
2843
* \return The inserted object if it was properly inserted.
2837
2844
*
2838
2845
* \return An existing object if the Group was merged or discarded
You can’t perform that action at this time.
0 commit comments