aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory
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
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')
-rw-r--r--util/memory/benchmark/pool/metrics/main.py2
-rw-r--r--util/memory/tempbuf.cpp24
2 files changed, 13 insertions, 13 deletions
diff --git a/util/memory/benchmark/pool/metrics/main.py b/util/memory/benchmark/pool/metrics/main.py
index 1674fb3aa4..cc17b7b888 100644
--- a/util/memory/benchmark/pool/metrics/main.py
+++ b/util/memory/benchmark/pool/metrics/main.py
@@ -2,4 +2,4 @@ import yatest.common as yc
def test_export_metrics(metrics):
- metrics.set_benchmark(yc.execute_benchmark('util/memory/benchmark/pool/pool', threads=8))
+ metrics.set_benchmark(yc.execute_benchmark('util/memory/benchmark/pool/pool', threads=8))
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();