aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/coroutine/engine/stack/stack_common.h
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-14 18:25:43 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-14 18:25:43 +0300
commitc7783ffcebf50c210ca2b469f3a52f59eb9045f8 (patch)
tree6c0885079aaefb96aa502108f458659aa66570de /library/cpp/coroutine/engine/stack/stack_common.h
parent831543961b2710a44df149e1d363638bc008d265 (diff)
downloadydb-c7783ffcebf50c210ca2b469f3a52f59eb9045f8.tar.gz
intermediate changes
ref:e520cbb2bc5359a80a7e56e636d1404e61f0c48c
Diffstat (limited to 'library/cpp/coroutine/engine/stack/stack_common.h')
-rw-r--r--library/cpp/coroutine/engine/stack/stack_common.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/coroutine/engine/stack/stack_common.h b/library/cpp/coroutine/engine/stack/stack_common.h
index ed2d74d296..0e81db56a8 100644
--- a/library/cpp/coroutine/engine/stack/stack_common.h
+++ b/library/cpp/coroutine/engine/stack/stack_common.h
@@ -1,15 +1,15 @@
#pragma once
-#include <cstdint>
+#include <cstddef>
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;
+ static constexpr size_t PageSize = 4096;
+ static constexpr size_t PageSizeMask = PageSize - 1; // for checks
+ static constexpr size_t DebugOrSanStackMultiplier = 4; // for debug or sanitizer builds
+ static constexpr size_t SmallStackMaxSizeInPages = 6;
enum class EGuard {
Canary, //!< writes some data to check it for corruption
@@ -17,19 +17,19 @@ namespace NCoro::NStack {
};
struct TPoolAllocatorSettings {
- uint64_t RssPagesToKeep = 1;
- uint64_t SmallStackRssPagesToKeep = 1; // for stack less than SmallStackMaxSizeInPages
- uint64_t ReleaseRate = 2;
+ size_t RssPagesToKeep = 1;
+ size_t SmallStackRssPagesToKeep = 1; // for stack less than SmallStackMaxSizeInPages
+ size_t ReleaseRate = 2;
#if !defined(_san_enabled_) && defined(NDEBUG)
- uint64_t StacksPerChunk = 256;
+ size_t StacksPerChunk = 256;
#else
- uint64_t StacksPerChunk = 2;
+ size_t StacksPerChunk = 2;
#endif
};
struct TAllocatorStats {
- uint64_t ReleasedSize = 0;
- uint64_t NotReleasedSize = 0;
- uint64_t NumOfAllocated = 0;
+ size_t ReleasedSize = 0;
+ size_t NotReleasedSize = 0;
+ size_t NumOfAllocated = 0;
};
}