I think it is necessary to make a small change to the cpuset API. The
current API was made fit to allow dynamically sized cpusets. I.e. an
alloc/modify/free style life cycle. The problem I see is, from where
should hwloc_cpuset_alloc() get the size of the cpuset? The solution I
see is to pass the hwloc_topology_t into hwloc_cpuset_alloc(), so that
the information comes from there .
I haven't looked through the whole tree, if a hwloc_topology_t is
always available at places where hwloc_cpuset_alloc() is called.
: linux exposes this as /sys/devices/system/cpu/kernel_max