fix memory allocation on NUMA systems