aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory/tempbuf.cpp
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:39 +0300
commita6a92afe03e02795227d2641b49819b687f088f8 (patch)
treef6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /util/memory/tempbuf.cpp
parentc6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff)
downloadydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/memory/tempbuf.cpp')
-rw-r--r--util/memory/tempbuf.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/util/memory/tempbuf.cpp b/util/memory/tempbuf.cpp
index 09a2d0f140..06a43843ba 100644
--- a/util/memory/tempbuf.cpp
+++ b/util/memory/tempbuf.cpp
@@ -132,7 +132,7 @@ namespace {
Unused_.ForEach(deleter);
}
- inline TPerThreadedBuf* Acquire() {
+ inline TPerThreadedBuf* Acquire() {
if (!Unused_.Empty()) {
return Unused_.PopFront();
}
@@ -154,15 +154,15 @@ static inline TTempBufManager* TempBufManager() {
return FastTlsSingletonWithPriority<TTempBufManager, 2>();
}
-static inline TTempBuf::TImpl* AcquireSmallBuffer(size_t size) {
-#if defined(_asan_enabled_)
- return new (size) TAllocedBuf();
-#else
- Y_UNUSED(size);
- return TempBufManager()->Acquire();
-#endif
-}
-
+static inline TTempBuf::TImpl* AcquireSmallBuffer(size_t size) {
+#if defined(_asan_enabled_)
+ return new (size) TAllocedBuf();
+#else
+ Y_UNUSED(size);
+ return TempBufManager()->Acquire();
+#endif
+}
+
void TPerThreadedBuf::Dispose() noexcept {
if (Manager_ == TempBufManager()) {
Manager_->Return(this);
@@ -172,7 +172,7 @@ void TPerThreadedBuf::Dispose() noexcept {
}
TTempBuf::TTempBuf()
- : Impl_(AcquireSmallBuffer(TMP_BUF_LEN))
+ : Impl_(AcquireSmallBuffer(TMP_BUF_LEN))
{
}
@@ -183,7 +183,7 @@ TTempBuf::TTempBuf()
*/
static inline TTempBuf::TImpl* ConstructImpl(size_t len) {
if (len <= TMP_BUF_LEN) {
- return AcquireSmallBuffer(len);
+ return AcquireSmallBuffer(len);
}
return new (len) TAllocedBuf();