> I am submitting a patch for a realloc function that might be useful. The > proposed numa_realloc() is merely a wrapper to mremap(), which it calls > with the flag MREMAP_MAYMOVE. The policy of the vm area is copied by the > kernel in case of moving. I am also submitting a test program, that > keeps expanding an initial allocation until a limit is reached and > checks the mempolicy of the expanded area in every iteration. > > My use case is a dynamic array implementation which uses realloc() to > dynamically expand the array and I want to convert it to a numa-aware > implementation. You need to call numa_police_memory_int() in the function, otherwise the policy won't be actually preserved. -Andi -- To unsubscribe from this list: send the line "unsubscribe linux-numa" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html