为什么使用numa_alloc_onnode()分配导致“页面不存在”?
当我使用numa_alloc_onnode()像这样在特定的NUMA节点上分配内存时: char *ptr; if ((ptr = (char *) numa_alloc_onnode(1024,1)) == NULL) { fprintf(stderr,"Problem in %s line %d allocating memory\n",__FILE__,__LINE__); return(1); } 然后使用move_pages()来尝试确认分配的内存确实在节点1上: printf("ptr is on node %d\n",get_node(ptr)); 哪里 // This function returns the NUMA node that a pointer address resides on. int get_node(void *p) { int status[1]; void *pa; unsigned long a; // round p […]