设置Processor Affinity 作用: 1.进程和线程的亲缘性(affinity),使进程或线程在指定的CPU(核)上运行.(比如程序A,在第4个核心上运行) 2.设置进程 或者 线程, 使用CPU的数量(比如程序A,在第1,2,3个(共3个核心)核心上运行) 3.CPU负载均衡 Processor_affinity @wiki Specific operating systems On Linux, the CPU affinity of a process can be alter…
The SetThreadAffinityMask function sets a processor affinity mask for the specified thread. DWORD_PTR SetThreadAffinityMask( HANDLE hThread, DWORD_PTR dwThreadAffinityMask ); Parameters hThread [in] Handle to the thread whose affinity mask is to be s…