Fix obs-cocoa CPU cores log output
According to http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-2a-manual.html the cores_per_package and logical_per_package returns the maximum number of (logical) cores addressable per package instead of the actual number of (logical) cores
This commit is contained in:
parent
0bf0266b2a
commit
75bba68a03
@ -102,12 +102,12 @@ static void log_processor_cores(void)
|
||||
int ret;
|
||||
|
||||
size = sizeof(physical_cores);
|
||||
ret = sysctlbyname("machdep.cpu.cores_per_package", &physical_cores,
|
||||
ret = sysctlbyname("machdep.cpu.core_count", &physical_cores,
|
||||
&size, NULL, 0);
|
||||
if (ret != 0)
|
||||
return;
|
||||
|
||||
ret = sysctlbyname("machdep.cpu.logical_per_package", &logical_cores,
|
||||
ret = sysctlbyname("machdep.cpu.thread_count", &logical_cores,
|
||||
&size, NULL, 0);
|
||||
if (ret != 0)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user