1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 14:14:04 +00:00

fix sysctl string

This commit is contained in:
Samuel Štancl 2024-09-27 23:21:08 +02:00
parent b01c16f4fc
commit f017b6509b

View file

@ -60,7 +60,7 @@ trait ParallelCommand
$size->cdata = FFI::sizeof($cores); $size->cdata = FFI::sizeof($cores);
// perflevel0 refers to P-cores on M-series, and the entire CPU on Intel Macs // perflevel0 refers to P-cores on M-series, and the entire CPU on Intel Macs
if ($darwin && $ffi->sysctlbyname('hw.xperflevel0.logicalcpu', FFI::addr($cores), FFI::addr($size), null, 0) === 0) { if ($darwin && $ffi->sysctlbyname('hw.perflevel0.logicalcpu', FFI::addr($cores), FFI::addr($size), null, 0) === 0) {
return $size->cdata; return $size->cdata;
} else if ($darwin) { } else if ($darwin) {
// Reset the size in case the pointer got written to (likely shouldn't happen) // Reset the size in case the pointer got written to (likely shouldn't happen)