/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2014-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace {
inline FiberManager::Options preprocessOptions(FiberManager::Options opts) {
-#if defined(FOLLY_SANITIZE_ADDRESS) || defined(UNDEFINED_SANITIZER)
- /* ASAN/UBSAN needs a lot of extra stack space.
+#if defined(FOLLY_SANITIZE_ADDRESS) || defined(UNDEFINED_SANITIZER) || \
+ defined(FOLLY_SANITIZE_THREAD)
+ /* Sanitizers need a lot of extra stack space.
16x is a conservative estimate, 8x also worked with tests
where it mattered. Note that overallocating here does not necessarily
increase RSS, since unused memory is pretty much free. */
return opts;
}
-} // anonymous
+} // namespace
inline void FiberManager::ensureLoopScheduled() {
if (isLoopScheduled_) {
return Promise<Result, BatonT>::await(std::forward<F>(func));
}
-}
-}
+} // namespace fibers
+} // namespace folly