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

Unified Diff: net/quic/quic_protocol.h

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_flags.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_protocol.h
diff --git a/net/quic/quic_protocol.h b/net/quic/quic_protocol.h
index 29214034c0e3eb3c87b8433b937c9bd4c0b90ce6..9ea4ee4074a7ef156d5750c03ed94ed93c31c14d 100644
--- a/net/quic/quic_protocol.h
+++ b/net/quic/quic_protocol.h
@@ -740,8 +740,17 @@ class NET_EXPORT_PRIVATE QuicBufferAllocator {
// Returns or allocates a new buffer of |size|. Never returns null.
virtual char* New(size_t size) = 0;
+ // Returns or allocates a new buffer of |size| if |flag_enable| is true.
+ // Otherwise, returns a buffer that is compatible with this class directly
+ // with operator new. Never returns null.
+ virtual char* New(size_t size, bool flag_enable) = 0;
+
// Releases a buffer.
virtual void Delete(char* buffer) = 0;
+
+ // Marks the allocator as being idle. Serves as a hint to notify the allocator
+ // that it should release any resources it's still holding on to.
+ virtual void MarkAllocatorIdle() {}
};
// Deleter for stream buffers. Copyable to support platforms where the deleter
« no previous file with comments | « net/quic/quic_flags.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698