Section: System Calls (2)
Return to Main Contents
get_mempolicy - get the current process' or memory address' NUMA policy
- int sys_get_mempolicy (int *policy, unsigned long *nmask, unsigned long maxnode, unsigned long addr, unsigned long flags);
get_mempolicy retrieves the NUMA policy of the current process or a memory address specified by addr. The memory policy defines which node memory is allocated to for the process. The policy is stored in policy when non-zero, with an associated nmask. maxnode is the maximum bit number plus one that can be stored into nmask. The bit number is rounded to a multiple of unsigned long. The only valid value other than zero for flags is MPOL_F_ILNODE. This value is only valid when the policy being retrieved is MPOL_INTERLEAVE. When this flag is specified, an unsigned long with the next node that would be used for interleaving is returned in nodemask.
get_mempolicy returns 0 on success; otherwise, it returns one of the errors listed in the "Errors" section.
An illegal parameter was passed in.
Invalid memory area accessed.
- Note: the numa(3) and numactl(8) man pages are not include in the man-pages package. They are available via the numactl-x.x.tar.gz package.
- RETURN VALUE
- SEE ALSO
linux.jgfs.net manual pages