Commit a0a9d4d3 authored by Krishna Monian's avatar Krishna Monian Committed by Facebook Github Bot

Android doesn't have cache data in sysfs

Summary: Since sysfs doesn't have cache information for the CPU on Android guard this on Android

Reviewed By: yfeldblum

Differential Revision: D7051199

fbshipit-source-id: 20fcfa91aa2f642c6cab33b0fb55f121b609d58f
parent 53807d13
...@@ -34,13 +34,13 @@ namespace folly { ...@@ -34,13 +34,13 @@ namespace folly {
/// Returns the best real CacheLocality information available /// Returns the best real CacheLocality information available
static CacheLocality getSystemLocalityInfo() { static CacheLocality getSystemLocalityInfo() {
#ifdef __linux__ if (kIsLinux) {
try { try {
return CacheLocality::readFromSysfs(); return CacheLocality::readFromSysfs();
} catch (...) { } catch (...) {
// keep trying // keep trying
}
} }
#endif
long numCpus = sysconf(_SC_NPROCESSORS_CONF); long numCpus = sysconf(_SC_NPROCESSORS_CONF);
if (numCpus <= 0) { if (numCpus <= 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment