mirror of
https://github.com/facebook/zstd
synced 2026-08-22 22:32:07 -04:00
If cpuinfo parsing fails fallback to sysconf
This commit is contained in:
parent
aec1e8c715
commit
eb1a09df61
1 changed files with 4 additions and 1 deletions
|
|
@ -1215,9 +1215,12 @@ int UTIL_countPhysicalCores(void)
|
|||
if (siblings && cpu_cores) {
|
||||
ratio = siblings / cpu_cores;
|
||||
}
|
||||
|
||||
numPhysicalCores = numPhysicalCores / ratio;
|
||||
|
||||
failed:
|
||||
fclose(cpuinfo);
|
||||
return numPhysicalCores = numPhysicalCores / ratio;
|
||||
return numPhysicalCores;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue