GET_MEMPOLICY(2) | Linux Programmer's Manual | GET_MEMPOLICY(2) |
NAME
get_mempolicy - retrieve NUMA memory policy for a processSYNOPSIS
#include <numaif.h>int get_mempolicy(int * mode , unsigned long * nodemask ,
unsigned long maxnode , unsigned long addr ,
unsigned long flags );
Link with -lnuma.
DESCRIPTION
get_mempolicy() retrieves the NUMA policy of the calling process or of a memory address, depending on the setting of flags.RETURN VALUE
On success, get_mempolicy() returns 0; on error, -1 is returned and errno is set to indicate the error.ERRORS
- EFAULT
- Part of all of the memory range specified by nodemask and maxnode points outside your accessible address space.
- EINVAL
- 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.)
VERSIONS
The get_mempolicy() system call was added to the Linux kernel in version 2.6.7.CONFORMING TO
This system call is Linux-specific.NOTES
For information on library support, see numa(7).SEE ALSO
getcpu(2), mbind(2), mmap(2), set_mempolicy(2), numa(3), numa(7), numactl(8)COLOPHON
This 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/.2008-08-15 | Linux |