OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_BUFFER_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ | 6 #define NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
7 | 7 |
8 // QuicStreamSequencerBuffer implements QuicStreamSequencerBufferInterface. | 8 // QuicStreamSequencerBuffer implements QuicStreamSequencerBufferInterface. |
9 // It is a circular stream buffer with random write and | 9 // It is a circular stream buffer with random write and |
10 // in-sequence read. It consists of a vector of pointers pointing | 10 // in-sequence read. It consists of a vector of pointers pointing |
11 // to memory blocks created as needed and a list of Gaps to indicate | 11 // to memory blocks created as needed and a list of Gaps to indicate |
12 // the missing data between the data already written into the buffer. | 12 // the missing data between the data already written into the buffer. |
13 // - Data are written in with offset indicating where it should be in the | 13 // - Data are written in with offset indicating where it should be in the |
14 // stream, and the buffer grown as needed (up to the maximum buffer capacity), | 14 // stream, and the buffer grown as needed (up to the maximum buffer capacity), |
15 // without expensive copying (extra blocks are allocated). | 15 // without expensive copying (extra blocks are allocated). |
16 // - Data can be read from the buffer if there is no gap before it, | 16 // - Data can be read from the buffer if there is no gap before it, |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 250 |
251 // For debugging use after free, assigned to 123456 in constructor and 654321 | 251 // For debugging use after free, assigned to 123456 in constructor and 654321 |
252 // in destructor. As long as it's not 123456, this means either use after free | 252 // in destructor. As long as it's not 123456, this means either use after free |
253 // or memory corruption. | 253 // or memory corruption. |
254 int32_t destruction_indicator_; | 254 int32_t destruction_indicator_; |
255 | 255 |
256 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer); | 256 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer); |
257 }; | 257 }; |
258 } // namespace net | 258 } // namespace net |
259 | 259 |
260 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ | 260 #endif // NET_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
OLD | NEW |