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

Unified Diff: net/quic/core/quic_packet_creator.cc

Issue 2599143003: Add a new QUIC platform API quic_aligned.h for the alignment macro definitions. (Closed)
Patch Set: windows 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_framer.cc ('k') | net/quic/core/quic_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_packet_creator.cc
diff --git a/net/quic/core/quic_packet_creator.cc b/net/quic/core/quic_packet_creator.cc
index c22bad537c2806e08c38e46f67d69b4436854e5b..cee8ca4486de1106e7412b89141008acf2cb05e3 100644
--- a/net/quic/core/quic_packet_creator.cc
+++ b/net/quic/core/quic_packet_creator.cc
@@ -14,6 +14,7 @@
#include "net/quic/core/quic_data_writer.h"
#include "net/quic/core/quic_flags.h"
#include "net/quic/core/quic_utils.h"
+#include "net/quic/platform/api/quic_aligned.h"
using base::StringPiece;
using std::string;
@@ -313,9 +314,7 @@ void QuicPacketCreator::Flush() {
return;
}
- // TODO(rtenneti): Change the default 64 alignas value (used the default
- // value from CACHELINE_SIZE).
- ALIGNAS(64) char seralized_packet_buffer[kMaxPacketSize];
+ QUIC_CACHELINE_ALIGNED char seralized_packet_buffer[kMaxPacketSize];
SerializePacket(seralized_packet_buffer, kMaxPacketSize);
OnSerializedPacket();
}
@@ -360,7 +359,7 @@ void QuicPacketCreator::CreateAndSerializeStreamFrame(
// Write out the packet header
QuicPacketHeader header;
FillPacketHeader(&header);
- ALIGNAS(64) char encrypted_buffer[kMaxPacketSize];
+ QUIC_CACHELINE_ALIGNED char encrypted_buffer[kMaxPacketSize];
QuicDataWriter writer(arraysize(encrypted_buffer), encrypted_buffer);
if (!framer_->AppendPacketHeader(header, &writer)) {
QUIC_BUG << "AppendPacketHeader failed";
« no previous file with comments | « net/quic/core/quic_framer.cc ('k') | net/quic/core/quic_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698