[PATCH] [10/15] Add numa_free_node/nodemask for API symmetry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just wrappers around numa_bitmask_free.

---
 numa.3 |   12 ++++++++++++
 numa.h |   10 ++++++++++
 2 files changed, 22 insertions(+)

Index: numactl-2.0.0/numa.h
===================================================================
--- numactl-2.0.0.orig/numa.h
+++ numactl-2.0.0/numa.h
@@ -113,6 +113,11 @@ struct bitmask *numa_get_interleave_mask
 /* allocate a bitmask big enough for all nodes */
 struct bitmask *numa_allocate_nodemask(void);
 
+static inline void numa_free_nodemask(struct bitmask *b)
+{
+	numa_bitmask_free(b);
+}
+
 /* Some node to preferably allocate memory from for thread. */
 void numa_set_preferred(int node);
 
@@ -198,6 +203,11 @@ int numa_num_task_nodes();
 /* allocate a bitmask the size of the kernel cpumask_t */
 struct bitmask *numa_allocate_cpumask();
 
+static inline void numa_free_cpumask(struct bitmask *b)
+{
+	numa_bitmask_free(b);
+}
+
 /* set up to represent the cpus available to the current task */
 struct bitmask *numa_all_cpus;
 
Index: numactl-2.0.0/numa.3
===================================================================
--- numactl-2.0.0.orig/numa.3
+++ numactl-2.0.0/numa.3
@@ -117,8 +117,12 @@ numa \- NUMA policy library
 .BI "int numa_node_to_cpus(int " node ", unsigned long *" buffer ", int " bufferlen );
 .sp
 .BI "struct bitmask *numa_allocate_cpumask();"
+.sp
+.BI "void numa_free_cpumask();"
 .br
 .BI "struct bitmask *numa_allocate_nodemask();"
+.sp
+.BI "void numa_free_nodemask();"
 .br
 .BI "struct bitmask *numa_bitmask_alloc(unsigned int " n ");
 .br
@@ -731,6 +735,10 @@ NR_CPUS cpus.  This number of cpus can b
 .BR numa_num_possible_cpus().
 The bitmask is zero-filled.
 
+.BR numa_free_cpumask
+frees a cpumask previously allocate by
+.I numa_allocate_cpumask.
+
 .BR numa_allocate_nodemask()
 returns a bitmask of a size equal to the kernel's node
 mask (kernel type nodemask_t).  In other words, large enough to represent
@@ -738,6 +746,10 @@ MAX_NUMNODES nodes.  This number of node
 .BR numa_num_possible_nodes().
 The bitmask is zero-filled.
 
+.BR numa_free_nodemask()
+frees a nodemask previous allocated by
+.I numa_allocate_nodemask().
+
 .BR numa_bitmask_alloc()
 allocates a bitmask structure and its associated bit mask.
 The memory allocated for the bit mask contains enough words (type unsigned
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux