Index: net/quic/quic_packet_generator.cc |
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc |
index e058178ac3c9ef34515d3a80a364124517a4caad..c85411fbfe087864ef8aa0a6ea623b47ceacbd9c 100644 |
--- a/net/quic/quic_packet_generator.cc |
+++ b/net/quic/quic_packet_generator.cc |
@@ -454,7 +454,12 @@ bool QuicPacketGenerator::AddFrame(const QuicFrame& frame, |
} |
void QuicPacketGenerator::SerializeAndSendPacket() { |
- char buffer[kMaxPacketSize]; |
+ // The optimized encryption algorithm implementations run faster when |
+ // operating on aligned memory. |
+ // |
+ // TODO(rtenneti): Change the default 64 alignas value (used the default |
+ // value from CACHELINE_SIZE). |
+ ALIGNAS(64) char buffer[kMaxPacketSize]; |
SerializedPacket serialized_packet = |
packet_creator_.SerializePacket(buffer, kMaxPacketSize); |
if (serialized_packet.packet == nullptr) { |