Skip to content

Commit 8f930cd

Browse files
committed
wireguard: set preallocbuffers
Signed-off-by: Mark Pashmfouroush <mark@markpash.me>
1 parent 7885b21 commit 8f930cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

wireguard/device/queueconstants_default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ const (
1515
QueueInboundSize = 1024
1616
QueueHandshakeSize = 1024
1717
MaxSegmentSize = (1 << 16) - 1 // largest possible UDP datagram
18-
PreallocatedBuffersPerPool = 0 // Disable and allow for infinite memory growth
18+
PreallocatedBuffersPerPool = 4096 // Disable and allow for infinite memory growth
1919
)

wireguard/device/queueconstants_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ const (
1111
QueueInboundSize = 1024
1212
QueueHandshakeSize = 1024
1313
MaxSegmentSize = 2048 - 32 // largest possible UDP datagram
14-
PreallocatedBuffersPerPool = 0 // Disable and allow for infinite memory growth
14+
PreallocatedBuffersPerPool = 4096 // Disable and allow for infinite memory growth
1515
)

0 commit comments

Comments
 (0)