#include <stdio.h>
#include <sys/types.h>
#include <thread>
-#include <unistd.h>
namespace fuzzer {
return Res;
}
-size_t PageSize() {
- static size_t PageSizeCached = sysconf(_SC_PAGESIZE);
- return PageSizeCached;
-}
-
} // namespace fuzzer
dup2(nullfd, Fd);
}
+size_t PageSize() {
+ static size_t PageSizeCached = _zx_system_get_page_size();
+ return PageSizeCached;
+}
+
} // namespace fuzzer
#endif // LIBFUZZER_FUCHSIA
return "grep '" + Regex + "'";
}
+size_t PageSize() {
+ static size_t PageSizeCached = sysconf(_SC_PAGESIZE);
+ return PageSizeCached;
+}
+
} // namespace fuzzer
#endif // LIBFUZZER_POSIX
fclose(Temp);
}
+size_t PageSize() {
+ static size_t PageSizeCached = []() -> size_t {
+ SYSTEM_INFO si;
+ GetSystemInfo(&si);
+ return si.dwPageSize;
+ }();
+ return PageSizeCached;
+}
+
} // namespace fuzzer
#endif // LIBFUZZER_WINDOWS