Does gcc, icc, or Microsoft's C/C++ compiler support or know anything about NUMA?

二次信任 提交于 2019-12-02 21:02:17

Linux kernel knows about NUMA and will try to give your process pages from memory local to the current CPU (source: U. Drepper, "What Every Programmer Should Know About Memory".)

NUMA-aware memory allocation is not done at compile time. Making assumptions like this would be bad for portability.

On Linux, this is a kernel function, though you can control this at runtime with numactl or set_mempolicy or with libnuma.

For MS platforms, the compiler is not aware of NUMA. However, the system is NUMA aware and will attempt to allocate memory in the same node.

See http://code.msdn.microsoft.com/64plusLP for some more details on how recent versions of Windows handle NUMA.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!