Skip to content

Conversation

jasonmolenda
Copy link

The qSpeedTest packet is used for experiments to determine the optimal packet size for a given communication medium, e.g. to transfer 10MB of memory, is it faster to send a hundred 100KB packets or ten 1MB packets. It creates a packet of the requested size in a stack allocation, but is not checking that its buffer is large enough for the requested size.

Change this allocation to be on heap, and impose a maximum size that can be tested (4MB, for now).

rdar://158630250
(cherry picked from commit ac8e7be)

The qSpeedTest packet is used for experiments to determine the optimal
packet size for a given communication medium, e.g. to transfer 10MB of
memory, is it faster to send a hundred 100KB packets or ten 1MB packets.
It creates a packet of the requested size in a stack allocation, but is
not checking that its buffer is large enough for the requested size.

Change this allocation to be on heap, and impose a maximum size that can
be tested (4MB, for now).

rdar://158630250
(cherry picked from commit ac8e7be)
@jasonmolenda jasonmolenda merged commit 6be8aac into swiftlang:stable/21.x Sep 8, 2025
@jasonmolenda jasonmolenda deleted the cp/r158630250-qspeedtest-max-packet-size branch September 8, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant