Skip to content

Commit d236850

Browse files
committed
CPUCache (macOS): fixes cache line size detection
1 parent 60ec8c9 commit d236850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/detection/cpucache/cpucache_apple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const char* ffDetectCPUCache(FFCPUCacheResult* result)
99
if (nPerfLevels <= 0) return "sysctl(hw.nperflevels) failed";
1010

1111
// macOS provides the global system cache line size
12-
uint32_t lineSize = (uint32_t) ffSysctlGetInt("hw.cachelinesize", 0);
12+
uint32_t lineSize = (uint32_t) ffSysctlGetInt64("hw.cachelinesize", 0);
1313

1414
char sysctlKey[128] = "hw.perflevelN.";
1515
char* pNum = sysctlKey + strlen("hw.perflevel");

0 commit comments

Comments
 (0)