diff options
author | alexeylaptev <alexeylaptev@yandex-team.ru> | 2022-02-10 16:50:06 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:06 +0300 |
commit | 13dbd0acb78595551b843005d6bd021bdc1a859b (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/coroutine/engine/stack/stack_utils.h | |
parent | 3106abc0443cda789ce4968aeee63d3a8fcc7d85 (diff) | |
download | ydb-13dbd0acb78595551b843005d6bd021bdc1a859b.tar.gz |
Restoring authorship annotation for <alexeylaptev@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/coroutine/engine/stack/stack_utils.h')
-rw-r--r-- | library/cpp/coroutine/engine/stack/stack_utils.h | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/library/cpp/coroutine/engine/stack/stack_utils.h b/library/cpp/coroutine/engine/stack/stack_utils.h index ba25cc38dc..46c65240b5 100644 --- a/library/cpp/coroutine/engine/stack/stack_utils.h +++ b/library/cpp/coroutine/engine/stack/stack_utils.h @@ -1,27 +1,27 @@ -#pragma once - -#include "stack_common.h" - - -namespace NCoro::NStack { - /*! Actual size of allocated memory can exceed size in pages, due to unaligned allocation. - * @param sizeInPages : number of pages to allocate - * @param rawPtr : pointer to unaligned memory. Should be passed to free() when is not used any more. - * @param alignedPtr : pointer to beginning of first fully allocated page - * @return : true on success - */ - bool GetAlignedMemory(uint64_t sizeInPages, char*& rawPtr, char*& alignedPtr) noexcept; - - /*! Release mapped RSS memory. - * @param alignedPt : page-size aligned memory on which RSS memory should be freed - * @param numOfPages : number of pages to free from RSS memory - */ - void ReleaseRss(char* alignedPtr, uint64_t numOfPages) noexcept; - - /*! Count pages with RSS memory - * @param alignedPtr : pointer to page-aligned memory for which calculations would be done - * @param numOfPages : number of pages to check - * @return : number of pages with RSS memory - */ - uint64_t CountMapped(char* alignedPtr, uint64_t numOfPages) noexcept; -} +#pragma once + +#include "stack_common.h" + + +namespace NCoro::NStack { + /*! Actual size of allocated memory can exceed size in pages, due to unaligned allocation. + * @param sizeInPages : number of pages to allocate + * @param rawPtr : pointer to unaligned memory. Should be passed to free() when is not used any more. + * @param alignedPtr : pointer to beginning of first fully allocated page + * @return : true on success + */ + bool GetAlignedMemory(uint64_t sizeInPages, char*& rawPtr, char*& alignedPtr) noexcept; + + /*! Release mapped RSS memory. + * @param alignedPt : page-size aligned memory on which RSS memory should be freed + * @param numOfPages : number of pages to free from RSS memory + */ + void ReleaseRss(char* alignedPtr, uint64_t numOfPages) noexcept; + + /*! Count pages with RSS memory + * @param alignedPtr : pointer to page-aligned memory for which calculations would be done + * @param numOfPages : number of pages to check + * @return : number of pages with RSS memory + */ + uint64_t CountMapped(char* alignedPtr, uint64_t numOfPages) noexcept; +} |