diff --git a/streamer/src/nonblocking/quic.rs b/streamer/src/nonblocking/quic.rs index f91798e99e9949..aca98bb4b45996 100644 --- a/streamer/src/nonblocking/quic.rs +++ b/streamer/src/nonblocking/quic.rs @@ -25,7 +25,7 @@ use { solana_keypair::Keypair, solana_measure::measure::Measure, solana_packet::{Meta, PACKET_DATA_SIZE}, - solana_perf::packet::{PacketBatch, PACKETS_PER_BATCH}, + solana_perf::packet::{PacketBatch, PacketBatchRecycler, PACKETS_PER_BATCH}, solana_pubkey::Pubkey, solana_quic_definitions::{ QUIC_CONNECTION_HANDSHAKE_TIMEOUT, QUIC_MAX_STAKED_CONCURRENT_STREAMS, @@ -888,10 +888,12 @@ async fn packet_batch_sender( coalesce: Duration, ) { trace!("enter packet_batch_sender"); + let recycler = PacketBatchRecycler::default(); let mut batch_start_time = Instant::now(); loop { let mut packet_perf_measure: Vec<([u8; 64], Instant)> = Vec::default(); - let mut packet_batch = PacketBatch::with_capacity(PACKETS_PER_BATCH); + let mut packet_batch = + PacketBatch::new_with_recycler(&recycler, PACKETS_PER_BATCH, "quic_packet_coalescer"); let mut total_bytes: usize = 0; stats