aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/coroutine/engine/stack/stack_common.h
diff options
context:
space:
mode:
authoralexeylaptev <alexeylaptev@yandex-team.ru>2022-02-10 16:50:06 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:06 +0300
commit3106abc0443cda789ce4968aeee63d3a8fcc7d85 (patch)
treeec44b9884cc11c2a7b4f4dc7fd36a1ae1ba2d3db /library/cpp/coroutine/engine/stack/stack_common.h
parenta76f5e1efe665e1bb125f05ae275b2a6226517d9 (diff)
downloadydb-3106abc0443cda789ce4968aeee63d3a8fcc7d85.tar.gz
Restoring authorship annotation for <alexeylaptev@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/coroutine/engine/stack/stack_common.h')
-rw-r--r--library/cpp/coroutine/engine/stack/stack_common.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/coroutine/engine/stack/stack_common.h b/library/cpp/coroutine/engine/stack/stack_common.h
index ed2d74d296..49e3466956 100644
--- a/library/cpp/coroutine/engine/stack/stack_common.h
+++ b/library/cpp/coroutine/engine/stack/stack_common.h
@@ -1,35 +1,35 @@
-#pragma once
-
-#include <cstdint>
-
-class TContExecutor;
-
-namespace NCoro::NStack {
-
- static constexpr uint64_t PageSize = 4096;
- static constexpr uint64_t PageSizeMask = PageSize - 1; // for checks
- static constexpr uint64_t DebugOrSanStackMultiplier = 4; // for debug or sanitizer builds
- static constexpr uint64_t SmallStackMaxSizeInPages = 6;
-
- enum class EGuard {
- Canary, //!< writes some data to check it for corruption
- Page, //!< prohibits access to page memory
- };
-
- struct TPoolAllocatorSettings {
- uint64_t RssPagesToKeep = 1;
- uint64_t SmallStackRssPagesToKeep = 1; // for stack less than SmallStackMaxSizeInPages
- uint64_t ReleaseRate = 2;
-#if !defined(_san_enabled_) && defined(NDEBUG)
- uint64_t StacksPerChunk = 256;
-#else
- uint64_t StacksPerChunk = 2;
-#endif
- };
-
- struct TAllocatorStats {
- uint64_t ReleasedSize = 0;
- uint64_t NotReleasedSize = 0;
- uint64_t NumOfAllocated = 0;
- };
-}
+#pragma once
+
+#include <cstdint>
+
+class TContExecutor;
+
+namespace NCoro::NStack {
+
+ static constexpr uint64_t PageSize = 4096;
+ static constexpr uint64_t PageSizeMask = PageSize - 1; // for checks
+ static constexpr uint64_t DebugOrSanStackMultiplier = 4; // for debug or sanitizer builds
+ static constexpr uint64_t SmallStackMaxSizeInPages = 6;
+
+ enum class EGuard {
+ Canary, //!< writes some data to check it for corruption
+ Page, //!< prohibits access to page memory
+ };
+
+ struct TPoolAllocatorSettings {
+ uint64_t RssPagesToKeep = 1;
+ uint64_t SmallStackRssPagesToKeep = 1; // for stack less than SmallStackMaxSizeInPages
+ uint64_t ReleaseRate = 2;
+#if !defined(_san_enabled_) && defined(NDEBUG)
+ uint64_t StacksPerChunk = 256;
+#else
+ uint64_t StacksPerChunk = 2;
+#endif
+ };
+
+ struct TAllocatorStats {
+ uint64_t ReleasedSize = 0;
+ uint64_t NotReleasedSize = 0;
+ uint64_t NumOfAllocated = 0;
+ };
+}