В качестве альтернативы есть функция get_mempolicy
в -lnuma:
http://linux.die.net/man/2/get_mempolicy
If flags specifies both MPOL_F_NODE and MPOL_F_ADDR, get_mempolicy() will
return the node ID of the node on which the address addr is allocated into
the location pointed to by mode. If no page has yet been allocated for the
specified address, get_mempolicy() will allocate a page as if the process had
performed a read [load] access to that address, and return the ID of the node
where that page was allocated.
Таким образом, узел numa страницы, на которую указывает ptr
, проверяется с помощью:
int numa_node = -1;
get_mempolicy(&numa_node, NULL, 0, (void*)ptr, MPOL_F_NODE | MPOL_F_ADDR);
return numa_node;