aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorbabenko <babenko@yandex-team.com>2023-05-20 12:48:01 +0300
committerbabenko <babenko@yandex-team.com>2023-05-20 12:48:01 +0300
commiteef1651eb98ca16cac30f13b6b98736ea2f2899a (patch)
tree57e95e709d3005a4223778976a4d1c5e4f827194 /library/cpp
parentdde72ac0b132311e33a3c35abd3d01965e68a9d8 (diff)
downloadydb-eef1651eb98ca16cac30f13b6b98736ea2f2899a.tar.gz
Enable more tests involving memory tagging
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/yt/memory/memory_tag.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/library/cpp/yt/memory/memory_tag.cpp b/library/cpp/yt/memory/memory_tag.cpp
index 342be5df34e..391816240f1 100644
--- a/library/cpp/yt/memory/memory_tag.cpp
+++ b/library/cpp/yt/memory/memory_tag.cpp
@@ -6,13 +6,17 @@ namespace NYT {
////////////////////////////////////////////////////////////////////////////////
+thread_local TMemoryTag CurrentMemoryTag;
+
Y_WEAK TMemoryTag GetCurrentMemoryTag()
{
- return NullMemoryTag;
+ return CurrentMemoryTag;
}
-Y_WEAK void SetCurrentMemoryTag(TMemoryTag /*tag*/)
-{ }
+Y_WEAK void SetCurrentMemoryTag(TMemoryTag tag)
+{
+ CurrentMemoryTag = tag;
+}
Y_WEAK size_t GetMemoryUsageForTag(TMemoryTag /*tag*/)
{