summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/ref.cpp
diff options
context:
space:
mode:
authorbabenko <[email protected]>2025-06-22 23:03:02 +0300
committerbabenko <[email protected]>2025-06-22 23:17:14 +0300
commit10a71dd65395813e9ca63e3f44bb26983a25c9dd (patch)
tree985fc9781653c24f9cb44fc404726375102b9daa /library/cpp/yt/memory/ref.cpp
parent7a0ac031fb88c8be200d5849184d45a3acc2ebea (diff)
YT-25312: Fix TWithExtraSpace::GetExtraSpace to handle zero returned by malloc_usable_size
commit_hash:d4310bf35afeb00d408d28e96cf82ebafd82886b
Diffstat (limited to 'library/cpp/yt/memory/ref.cpp')
-rw-r--r--library/cpp/yt/memory/ref.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cpp/yt/memory/ref.cpp b/library/cpp/yt/memory/ref.cpp
index de04a83870e..7863d7b41d3 100644
--- a/library/cpp/yt/memory/ref.cpp
+++ b/library/cpp/yt/memory/ref.cpp
@@ -150,8 +150,8 @@ public:
TRefCountedTypeCookie cookie)
{
if (options.ExtendToUsableSize) {
- if (auto usableSize = GetUsableSpaceSize(); usableSize != 0) {
- size = usableSize;
+ if (auto usableSize = GetUsableSpaceSize()) {
+ size = *usableSize;
}
}
Initialize(size, options, cookie);