diff options
author | breakneck <breakneck@yandex-team.ru> | 2022-02-10 16:47:58 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:58 +0300 |
commit | e2021f9a0e54d13b7c48796318b13b66dc625e74 (patch) | |
tree | 5aed1691033eaf399ab80a10a137238922035fa8 /library/cpp/lfalloc/lf_allocX64.h | |
parent | 83602b1b564b92a80a1526d113fa2846661dd10e (diff) | |
download | ydb-e2021f9a0e54d13b7c48796318b13b66dc625e74.tar.gz |
Restoring authorship annotation for <breakneck@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/lfalloc/lf_allocX64.h')
-rw-r--r-- | library/cpp/lfalloc/lf_allocX64.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/cpp/lfalloc/lf_allocX64.h b/library/cpp/lfalloc/lf_allocX64.h index fd2a906d6f..613cb8dab3 100644 --- a/library/cpp/lfalloc/lf_allocX64.h +++ b/library/cpp/lfalloc/lf_allocX64.h @@ -29,7 +29,7 @@ #define PERTHREAD __declspec(thread) #define _win_ -#define Y_FORCE_INLINE __forceinline +#define Y_FORCE_INLINE __forceinline using TAtomic = volatile long; @@ -293,7 +293,7 @@ enum ELFAllocCounter { CT_MAX }; -static Y_FORCE_INLINE void IncrementCounter(ELFAllocCounter counter, size_t value); +static Y_FORCE_INLINE void IncrementCounter(ELFAllocCounter counter, size_t value); ////////////////////////////////////////////////////////////////////////// enum EMMapMode { @@ -1011,20 +1011,20 @@ struct TLocalCounter { int Updates; TAtomic* Parent; - Y_FORCE_INLINE void Init(TAtomic* parent) { + Y_FORCE_INLINE void Init(TAtomic* parent) { Parent = parent; Value = 0; Updates = 0; } - Y_FORCE_INLINE void Increment(size_t value) { + Y_FORCE_INLINE void Increment(size_t value) { Value += value; if (++Updates > MAX_LOCAL_UPDATES || Value > MAX_LOCAL_DELTA) { Flush(); } } - Y_FORCE_INLINE void Flush() { + Y_FORCE_INLINE void Flush() { AtomicAdd(*Parent, Value); Value = 0; Updates = 0; |