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

Side by Side Diff: net/quic/core/quic_stream_sequencer.h

Issue 2328633004: lazy allocation and early release memory in QuicStreamSequencerBuffer. Protected by --quic_reduce_s… (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_stream_sequencer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_H_ 5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_H_
6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_H_ 6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void SetUnblocked(); 72 void SetUnblocked();
73 73
74 // Blocks processing of frames until |SetUnblocked| is called. 74 // Blocks processing of frames until |SetUnblocked| is called.
75 void SetBlockedUntilFlush(); 75 void SetBlockedUntilFlush();
76 76
77 // Sets the sequencer to discard all incoming data itself and not call 77 // Sets the sequencer to discard all incoming data itself and not call
78 // |stream_->OnDataAvailable()|. |stream_->OnFinRead()| will be called 78 // |stream_->OnDataAvailable()|. |stream_->OnFinRead()| will be called
79 // automatically when the FIN is consumed (which may be immediately). 79 // automatically when the FIN is consumed (which may be immediately).
80 void StopReading(); 80 void StopReading();
81 81
82 // Free the memory of underlying buffer.
83 void ReleaseBuffer();
84
82 // Number of bytes in the buffer right now. 85 // Number of bytes in the buffer right now.
83 size_t NumBytesBuffered() const; 86 size_t NumBytesBuffered() const;
84 87
85 // Number of bytes has been consumed. 88 // Number of bytes has been consumed.
86 QuicStreamOffset NumBytesConsumed() const; 89 QuicStreamOffset NumBytesConsumed() const;
87 90
88 int num_frames_received() const { return num_frames_received_; } 91 int num_frames_received() const { return num_frames_received_; }
89 92
90 int num_duplicate_frames_received() const { 93 int num_duplicate_frames_received() const {
91 return num_duplicate_frames_received_; 94 return num_duplicate_frames_received_;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 144
142 // If true, all incoming data will be discarded. 145 // If true, all incoming data will be discarded.
143 bool ignore_read_data_; 146 bool ignore_read_data_;
144 147
145 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer); 148 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer);
146 }; 149 };
147 150
148 } // namespace net 151 } // namespace net
149 152
150 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_H_ 153 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_flags_list.h ('k') | net/quic/core/quic_stream_sequencer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698