aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/prof/tcmalloc.cpp
diff options
context:
space:
mode:
authormonster <monster@yandex-team.ru>2022-02-10 16:47:19 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:19 +0300
commitb23c1d7a8015c2006a148fd93b84cdeb0aee17a3 (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/cpp/actors/prof/tcmalloc.cpp
parentdd76ae1f6213d065375ab296699f764faafbe5bd (diff)
downloadydb-b23c1d7a8015c2006a148fd93b84cdeb0aee17a3.tar.gz
Restoring authorship annotation for <monster@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/actors/prof/tcmalloc.cpp')
-rw-r--r--library/cpp/actors/prof/tcmalloc.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/library/cpp/actors/prof/tcmalloc.cpp b/library/cpp/actors/prof/tcmalloc.cpp
index 331181e80b..3d4f203dbb 100644
--- a/library/cpp/actors/prof/tcmalloc.cpp
+++ b/library/cpp/actors/prof/tcmalloc.cpp
@@ -1,32 +1,32 @@
-#include "tcmalloc.h"
-
-#include <contrib/libs/tcmalloc/tcmalloc/malloc_extension.h>
-
-namespace NProfiling {
-
-static thread_local ui32 AllocationTag = 0;
-
-static struct TInitTCMallocCallbacks {
- static void* CreateTag() {
- return reinterpret_cast<void*>(AllocationTag);
- }
- static void* CopyTag(void* tag) {
- return tag;
- }
- static void DestroyTag(void* tag) {
- Y_UNUSED(tag);
- }
-
- TInitTCMallocCallbacks() {
- tcmalloc::MallocExtension::SetSampleUserDataCallbacks(
- CreateTag, CopyTag, DestroyTag);
- }
-} InitTCMallocCallbacks;
-
-ui32 SetTCMallocThreadAllocTag(ui32 tag) {
- ui32 prev = AllocationTag;
- AllocationTag = tag;
- return prev;
-}
-
-}
+#include "tcmalloc.h"
+
+#include <contrib/libs/tcmalloc/tcmalloc/malloc_extension.h>
+
+namespace NProfiling {
+
+static thread_local ui32 AllocationTag = 0;
+
+static struct TInitTCMallocCallbacks {
+ static void* CreateTag() {
+ return reinterpret_cast<void*>(AllocationTag);
+ }
+ static void* CopyTag(void* tag) {
+ return tag;
+ }
+ static void DestroyTag(void* tag) {
+ Y_UNUSED(tag);
+ }
+
+ TInitTCMallocCallbacks() {
+ tcmalloc::MallocExtension::SetSampleUserDataCallbacks(
+ CreateTag, CopyTag, DestroyTag);
+ }
+} InitTCMallocCallbacks;
+
+ui32 SetTCMallocThreadAllocTag(ui32 tag) {
+ ui32 prev = AllocationTag;
+ AllocationTag = tag;
+ return prev;
+}
+
+}