aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/coroutine/engine/stack/stack_pool.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_pool.h
parent831543961b2710a44df149e1d363638bc008d265 (diff)
downloadydb-c7783ffcebf50c210ca2b469f3a52f59eb9045f8.tar.gz
intermediate changes
ref:e520cbb2bc5359a80a7e56e636d1404e61f0c48c
Diffstat (limited to 'library/cpp/coroutine/engine/stack/stack_pool.h')
-rw-r--r--library/cpp/coroutine/engine/stack/stack_pool.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/cpp/coroutine/engine/stack/stack_pool.h b/library/cpp/coroutine/engine/stack/stack_pool.h
index 27a8e9394b..d9b38e0ac3 100644
--- a/library/cpp/coroutine/engine/stack/stack_pool.h
+++ b/library/cpp/coroutine/engine/stack/stack_pool.h
@@ -21,16 +21,16 @@ namespace NCoro::NStack {
char* Aligned = nullptr; // points to aligned memory, which includes space for first page guard
};
public:
- TPool(uint64_t stackSize, const TPoolAllocatorSettings& settings, const TGuard& guard);
+ TPool(size_t stackSize, const TPoolAllocatorSettings& settings, const TGuard& guard);
TPool(TPool&& other) noexcept;
~TPool();
NDetails::TStack AllocStack(const char* name);
void FreeStack(NDetails::TStack& stack);
- uint64_t GetReleasedSize() const noexcept;
- uint64_t GetFullSize() const noexcept;
- uint64_t GetNumOfAllocated() const noexcept { return NumOfAllocated_; }
+ size_t GetReleasedSize() const noexcept;
+ size_t GetFullSize() const noexcept;
+ size_t GetNumOfAllocated() const noexcept { return NumOfAllocated_; }
private:
void AllocNewMemoryChunk();
@@ -39,14 +39,14 @@ namespace NCoro::NStack {
NDetails::TStack AllocNewStack(const char* name);
private:
- const uint64_t StackSize_ = 0;
- uint64_t RssPagesToKeep_ = 0;
+ const size_t StackSize_ = 0;
+ size_t RssPagesToKeep_ = 0;
const TGuard& Guard_;
TVector<TMemory> Memory_; // memory chunks
THolder<TStorage> Storage_;
char* NextToAlloc_ = nullptr; // points to next available stack in the last memory chunk
- const uint64_t ChunkSize_ = 0;
- uint64_t NumOfAllocated_ = 0;
+ const size_t ChunkSize_ = 0;
+ size_t NumOfAllocated_ = 0;
};
}