diff options
| -rw-r--r-- | library/cpp/yt/memory/chunked_memory_pool.cpp | 2 | ||||
| -rw-r--r-- | library/cpp/yt/memory/ref.cpp | 6 | ||||
| -rw-r--r-- | library/cpp/yt/misc/port.h | 8 |
3 files changed, 13 insertions, 3 deletions
diff --git a/library/cpp/yt/memory/chunked_memory_pool.cpp b/library/cpp/yt/memory/chunked_memory_pool.cpp index a10a6fe724f..d8673f5d6c3 100644 --- a/library/cpp/yt/memory/chunked_memory_pool.cpp +++ b/library/cpp/yt/memory/chunked_memory_pool.cpp @@ -15,6 +15,8 @@ TAllocationHolder::TAllocationHolder(TMutableRef ref, TRefCountedTypeCookie cook TRefCountedTrackerFacade::AllocateTagInstance(Cookie_); TRefCountedTrackerFacade::AllocateSpace(Cookie_, Ref_.Size()); } +#else + Y_UNUSED(cookie); #endif } diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp index c01094846ee..4d02ef6875b 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_); } diff --git a/library/cpp/yt/misc/port.h b/library/cpp/yt/misc/port.h index fe1c5e96de9..fd7df53855b 100644 --- a/library/cpp/yt/misc/port.h +++ b/library/cpp/yt/misc/port.h @@ -7,9 +7,11 @@ #error YT requires 64-bit platform #endif -// This define enables tracking of reference-counted objects to provide -// various insightful information on memory usage and object creation patterns. -#define YT_ENABLE_REF_COUNTED_TRACKING +#ifndef YT_DISABLE_REF_COUNTED_TRACKING + // This define enables tracking of reference-counted objects to provide + // various insightful information on memory usage and object creation patterns. + #define YT_ENABLE_REF_COUNTED_TRACKING +#endif // This define enables logging with TRACE level. You can still disable trace logging // for particular TU by discarding this macro identifier. |
