aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/ref.cpp
diff options
context:
space:
mode:
authornastprol <nastprol@yandex-team.com>2024-09-25 20:02:27 +0300
committernastprol <nastprol@yandex-team.com>2024-09-25 20:14:52 +0300
commite4a44c558f1c4081f70d159f2624866b4f0df9a2 (patch)
tree1d01afe6dd6445f7c56c8917707dccce1e352e63 /library/cpp/yt/memory/ref.cpp
parente57557664329c3fe4b335c9ab95daad155d9e193 (diff)
downloadydb-e4a44c558f1c4081f70d159f2624866b4f0df9a2.tar.gz
Add an option to disable refcounted tracking
commit_hash:ceb575c0377d4a48c0507590d878e690e92f5c63
Diffstat (limited to 'library/cpp/yt/memory/ref.cpp')
-rw-r--r--library/cpp/yt/memory/ref.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp
index c01094846e..4d02ef6875 100644
--- a/library/cpp/yt/memory/ref.cpp
+++ b/library/cpp/yt/memory/ref.cpp
@@ -59,6 +59,8 @@ public:
#ifdef YT_ENABLE_REF_COUNTED_TRACKING
TRefCountedTrackerFacade::AllocateTagInstance(Cookie_);
TRefCountedTrackerFacade::AllocateSpace(Cookie_, String_.length());
+#else
+ Y_UNUSED(cookie);
#endif
}
~TStringHolder()
@@ -119,7 +121,11 @@ protected:
TRefCountedTypeCookie cookie)
{
Size_ = size;
+#ifdef YT_ENABLE_REF_COUNTED_TRACKING
Cookie_ = cookie;
+#else
+ Y_UNUSED(cookie);
+#endif
if (options.InitializeStorage) {
::memset(static_cast<TDerived*>(this)->GetBegin(), 0, Size_);
}