ENH: fix crash on cygwin
This commit is contained in:
parent
d0237abfd4
commit
735b77798d
|
@ -2186,7 +2186,6 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
|
|||
// Physical ids returned by Linux don't distinguish cores.
|
||||
// We want to record the total number of cores in this->NumberOfPhysicalCPU
|
||||
// (checking only the first proc)
|
||||
|
||||
kwsys_stl::string cores =
|
||||
this->ExtractValueFromCpuInfoFile(buffer,"cpu cores");
|
||||
int numberOfCoresPerCPU=atoi(cores.c_str());
|
||||
|
@ -2194,8 +2193,11 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
|
|||
|
||||
#else // __CYGWIN__
|
||||
// does not have "physical id" entries, neither "cpu cores"
|
||||
// this has to be fixed for hyper-threading.
|
||||
this->NumberOfPhysicalCPU=this->NumberOfLogicalCPU;
|
||||
// this has to be fixed for hyper-threading.
|
||||
kwsys_stl::string cpucount =
|
||||
this->ExtractValueFromCpuInfoFile(buffer,"cpu count");
|
||||
this->NumberOfPhysicalCPU=
|
||||
this->NumberOfLogicalCPU = atoi(cpucount.c_str());
|
||||
#endif
|
||||
|
||||
// LogicalProcessorsPerPhysical>1 => hyperthreading.
|
||||
|
|
Loading…
Reference in New Issue