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 | 3106abc0443cda789ce4968aeee63d3a8fcc7d85 (patch) | |
tree | ec44b9884cc11c2a7b4f4dc7fd36a1ae1ba2d3db /library/cpp/coroutine/engine/stack/stack_utils.h | |
parent | a76f5e1efe665e1bb125f05ae275b2a6226517d9 (diff) | |
download | ydb-3106abc0443cda789ce4968aeee63d3a8fcc7d85.tar.gz |
Restoring authorship annotation for <alexeylaptev@yandex-team.ru>. Commit 1 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 46c65240b5..ba25cc38dc 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; +} |