[PATCH] D39490: [scudo] Make getNumberOfCPUs Fuchsia compliant
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 2 05:01:25 PDT 2017
krytarowski added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:1842
+ size_t len = sizeof(ncpu);
+ if (sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0) == -1) {
+ Printf("sysctl hw.ncpu failed\n");
----------------
This function calls internally malloc(). In fact sysconf() wraps sysctlbyname() too.
Please switch to `sysctl()`
Repository:
rL LLVM
https://reviews.llvm.org/D39490
More information about the llvm-commits
mailing list