Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Unified Diff: net/quic/quic_protocol.cc

Issue 1577473002: relnote: QUIC streamable frames can now use a freelist for their packet buffers, Guarded by gfe2_fe… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@19_CL_111440524
Patch Set: cast to size_t Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_simple_buffer_allocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_simple_buffer_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698