Back to index

numactl  2.0.8~rc4
mynode.c
Go to the documentation of this file.
00001 #include <numa.h>
00002 #include <numaif.h>
00003 #include <stdio.h>
00004 
00005 int main(void)
00006 {
00007        int nd;
00008        char *man = numa_alloc(1000); 
00009        *man = 1;
00010        if (get_mempolicy(&nd, NULL, 0, man, MPOL_F_NODE|MPOL_F_ADDR) < 0)
00011               perror("get_mempolicy");
00012        else
00013               printf("my node %d\n", nd); 
00014        return 0;
00015 }