aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory/tempbuf.cpp
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:40 +0300
commit5d50718e66d9c037dc587a0211110b7d25a66185 (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /util/memory/tempbuf.cpp
parenta6a92afe03e02795227d2641b49819b687f088f8 (diff)
downloadydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 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 06a43843ba..09a2d0f140 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();