Simple C code can use libnuma
library to allocate memory in specific memory node in a NUMA system. For example, it can be done using following function:
void *numa_alloc_onnode(size_t size, int node)
How one instantiate a class in some memory node? One way, I can think of is:
numa_set_membind(<nodemask>);
o = new Object();
numa_set_localalloc();
Will this work?