Index: net/quic/quic_protocol.cc |
diff --git a/net/quic/quic_protocol.cc b/net/quic/quic_protocol.cc |
index a5fb29cf2dd31738bf94dcd20587fd2a43b82a81..e683b4d3ad951becfb7f5b4e16d570a2620d119e 100644 |
--- a/net/quic/quic_protocol.cc |
+++ b/net/quic/quic_protocol.cc |
@@ -106,13 +106,17 @@ QuicBufferAllocator::~QuicBufferAllocator() = default; |
void StreamBufferDeleter::operator()(char* buffer) const { |
if (allocator_ != nullptr && buffer != nullptr) { |
allocator_->Delete(buffer); |
+ if (!FLAGS_use_stream_frame_freelist) { |
+ allocator_->MarkAllocatorIdle(); |
+ } |
} |
} |
UniqueStreamBuffer NewStreamBuffer(QuicBufferAllocator* allocator, |
size_t size) { |
- return UniqueStreamBuffer(allocator->New(size), |
- StreamBufferDeleter(allocator)); |
+ return UniqueStreamBuffer( |
+ allocator->New(size, FLAGS_use_stream_frame_freelist), |
+ StreamBufferDeleter(allocator)); |
} |
QuicStreamFrame::QuicStreamFrame() |