I have allocated an array in C as follows:
void *mem = mmap(NULL, 8192, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0);
Imagine this array is initialized and now I need to migrate (pin) it to a NUMA node. I know I can use numa_alloc_on_node() function to directly allocate on a node. However, please note that the concern here is to migrate the already allocated memory to a specified node. Is there any way to do this in C?
Thanks