2011-07-05 13 views

答えて

0

設定ProcessorAffinity

0x0001 = 0000 0001 - run on 1st core 
       ↑ 
0x0002 = 0000 0010 - run on 2nd core 
       ↑ 
0x0003 = 0000 0011 - run on 1st and 2nd core 
       ↑↑ 
0x0004 = 0000 0100 - run on 3rd core 
       ↑ 

シンプルコード:

using (var process = Process.GetCurrentProcess()) 
{ 
    // only run on core number 1 
    process.ProcessorAffinity = (IntPtr) 0x0001; 
} 
関連する問題