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

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

Issue 2566473002: Fix include guards for QUIC files. (Closed)
Patch Set: Created 4 years 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_multipath_transmissions_map.h ('k') | net/quic/core/quic_packet_creator.h » ('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) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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 // An arena that consists of a single inlined block of |ArenaSize|. Useful to 5 // An arena that consists of a single inlined block of |ArenaSize|. Useful to
6 // avoid repeated calls to malloc/new and to improve memory locality. DCHECK's 6 // avoid repeated calls to malloc/new and to improve memory locality. DCHECK's
7 // if an allocation out of the arena ever fails in debug builds; falls back to 7 // if an allocation out of the arena ever fails in debug builds; falls back to
8 // heap allocation in release builds. 8 // heap allocation in release builds.
9 9
10 #ifndef NET_QUIC_QUIC_ONE_BLOCK_ARENA_H_ 10 #ifndef NET_QUIC_CORE_QUIC_ONE_BLOCK_ARENA_H_
11 #define NET_QUIC_QUIC_ONE_BLOCK_ARENA_H_ 11 #define NET_QUIC_CORE_QUIC_ONE_BLOCK_ARENA_H_
12 12
13 #include "net/quic/core/quic_arena_scoped_ptr.h" 13 #include "net/quic/core/quic_arena_scoped_ptr.h"
14 #include "net/quic/core/quic_flags.h" 14 #include "net/quic/core/quic_flags.h"
15 #include "net/quic/core/quic_utils.h" 15 #include "net/quic/core/quic_utils.h"
16 16
17 #define PREDICT_FALSE(x) x 17 #define PREDICT_FALSE(x) x
18 18
19 namespace net { 19 namespace net {
20 20
21 template <uint32_t ArenaSize> 21 template <uint32_t ArenaSize>
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 void* buf = &storage_[offset_]; 68 void* buf = &storage_[offset_];
69 new (buf) T(std::forward<Args>(args)...); 69 new (buf) T(std::forward<Args>(args)...);
70 offset_ += AlignedSize<T>(); 70 offset_ += AlignedSize<T>();
71 return QuicArenaScopedPtr<T>(buf, 71 return QuicArenaScopedPtr<T>(buf,
72 QuicArenaScopedPtr<T>::ConstructFrom::kArena); 72 QuicArenaScopedPtr<T>::ConstructFrom::kArena);
73 } 73 }
74 74
75 } // namespace net 75 } // namespace net
76 76
77 #endif // NET_QUIC_QUIC_ONE_BLOCK_ARENA_H_ 77 #endif // NET_QUIC_CORE_QUIC_ONE_BLOCK_ARENA_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_multipath_transmissions_map.h ('k') | net/quic/core/quic_packet_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698