[PATCH] D40121: [scudo] Make getNumberOfCPUs Fuchsia compliant v2

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 13:18:24 PST 2017


alekseyshl added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_linux_libcdep.cc:557
+// sysconf(_SC_NPROCESSORS_{CONF,ONLN}) cannot be used as they allocate memory.
+u32 GetNumberOfCPUs() {
+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
----------------
We might want to cache the result, the same as GetPageSizeCached does, Android code seems to be pretty heavy and other branches will benefit from it too.


Repository:
  rL LLVM

https://reviews.llvm.org/D40121





More information about the llvm-commits mailing list