I am trying to use mbind() in my C++ code in order to rearrange virtual pages across 4 NUMA domains, unfortunately I am new to this function:
long mbind(void *addr, unsigned long len, int mode, const unsigned long *nodemask,
unsigned long maxnode, unsigned flags);
Currently, I have something like this:
mbind(0x0,4611686018424767488,MPOL_BIND,nodemask,maxnode,MPOL_MF_MOVE);
From the specs it's still unclear to me what to put and how to put for nodemask
and maxnode
.