I am trying to adjust the proximity of a processor to a process on a machine with 16 physical core cores, 32 logical ones. We used to use int, but this is an overflow when you have 32 logical cores.
Will a long one be used instead of an int when the processor compatibility setting is still working?
See code below.
try
{
string pathToExe = GetPathToExe( jobType );
long processorAffinity = DetermineProcessorAffinity();
Process jobProcess = Process.Start( pathToExe, jobId.ToString() );
if ( jobProcess != null )
{
jobProcess.ProcessorAffinity = new IntPtr( processorAffinity );
}
}
source
share