don't use readFromSysfs on non-linux
authorSara Golemon <sgolemon@fb.com>
Fri, 15 Aug 2014 05:30:58 +0000 (22:30 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 15 Aug 2014 05:38:01 +0000 (22:38 -0700)
commit37ac741361ee8245da19ad8a63efff6fbe6d71eb
treefb5dfa850b42e651eef7c4d9f23d23e4a090c220
parentbc5b5b9e711d6c5289ca894eb5e537316bf5f844
don't use readFromSysfs on non-linux

Summary:
It eventually tries to read from /sys/devices which is not portable.
Let's just fall back to sysconf/CacheLocality::uniform.

This fixes a runtime crash on OSX, but CYGWIN/BSD were probably also
affected.
Closes #80

@override-unit-failures

Test Plan: author tested, contbuild, flib

Reviewed By: joelm@fb.com

FB internal diff: D1498567
folly/detail/CacheLocality.cpp