aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authoralexvru <alexvru@ydb.tech>2023-10-16 18:00:21 +0300
committeralexvru <alexvru@ydb.tech>2023-10-16 18:21:29 +0300
commit2ccfda7458622536129fd3b68e9dfbbe971e36f0 (patch)
treefeb9ef8c1cbc53f3bb5da11d81d2d50636951b47 /library
parentee254664ac9703699434b1a36351cebbcac2f9b0 (diff)
downloadydb-2ccfda7458622536129fd3b68e9dfbbe971e36f0.tar.gz
Fix memory leak in TRopeArena KIKIMR-19632
Diffstat (limited to 'library')
-rw-r--r--library/cpp/actors/util/rope.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/library/cpp/actors/util/rope.h b/library/cpp/actors/util/rope.h
index d1385f6b75..1ab9a1b8ee 100644
--- a/library/cpp/actors/util/rope.h
+++ b/library/cpp/actors/util/rope.h
@@ -915,8 +915,6 @@ class TRopeArena {
TAllocateCallback Allocator;
TRope Arena;
- size_t Size = 0;
- THashSet<const void*> AccountedBuffers;
public:
TRopeArena(TAllocateCallback&& allocator)
@@ -949,16 +947,6 @@ public:
return res;
}
-
- size_t GetSize() const {
- return Size;
- }
-
- void AccountChunk(const TRcBuf& chunk) {
- if (AccountedBuffers.insert(chunk.Backend.UniqueId()).second) {
- Size += chunk.GetOccupiedMemorySize();
- }
- }
};
struct TRopeUtils {
@@ -1131,9 +1119,6 @@ inline TRope TRope::CopySpaceOptimized(TRope&& origin, size_t worstRatioPer1k, T
}
res.Size = origin.Size;
origin = TRope();
- for (const TRcBuf& chunk : res.Chain) {
- arena.AccountChunk(chunk);
- }
return res;
}