|GET_MEMPOLICY(2)||Linux Programmer's Manual||GET_MEMPOLICY(2)|
NAMEget_mempolicy - retrieve NUMA memory policy for a process
int get_mempolicy(int * mode , unsigned long * nodemask ,
unsigned long maxnode , unsigned long addr ,
unsigned long flags );
Link with -lnuma.
DESCRIPTIONget_mempolicy() retrieves the NUMA policy of the calling process or of a memory address, depending on the setting of flags.
RETURN VALUEOn success, get_mempolicy() returns 0; on error, -1 is returned and errno is set to indicate the error.
- Part of all of the memory range specified by nodemask and maxnode points outside your accessible address space.
- The value specified by maxnode is less than the number of node IDs supported by the system. Or flags specified values other than MPOL_F_NODE or MPOL_F_ADDR; or flags specified MPOL_F_ADDR and addr is NULL, or flags did not specify MPOL_F_ADDR and addr is not NULL. Or, flags specified MPOL_F_NODE but not MPOL_F_ADDR and the current process policy is not MPOL_INTERLEAVE. Or, flags specified MPOL_F_MEMS_ALLOWED with either MPOL_F_ADDR or MPOL_F_NODE. (And there are other EINVAL cases.)
VERSIONSThe get_mempolicy() system call was added to the Linux kernel in version 2.6.7.
CONFORMING TOThis system call is Linux-specific.
NOTESFor information on library support, see numa(7).
SEE ALSOgetcpu(2), mbind(2), mmap(2), set_mempolicy(2), numa(3), numa(7), numactl(8)
COLOPHONThis page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/.