mirror of https://github.com/tailscale/tailscale/
go.mod: update wireguard-go, taking control over iOS memory usage from our fork
Our wireguard-go fork used different values from upstream for
package device's memory limits on iOS.
This was the last blocker to removing our fork.
These values are now vars rather than consts for iOS.
c27ff9b9f6
Adjust them on startup to our preferred values.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
pull/1979/head
parent
5666663370
commit
8bf2a38f29
@ -0,0 +1,21 @@
|
||||
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package wgengine
|
||||
|
||||
import (
|
||||
"github.com/tailscale/wireguard-go/device"
|
||||
)
|
||||
|
||||
// iOS has a very restrictive memory limit on network extensions.
|
||||
// Reduce the maximum amount of memory that wireguard-go can allocate
|
||||
// to avoid getting killed.
|
||||
|
||||
func init() {
|
||||
device.QueueStagedSize = 64
|
||||
device.QueueOutboundSize = 64
|
||||
device.QueueInboundSize = 64
|
||||
device.QueueHandshakeSize = 64
|
||||
device.PreallocatedBuffersPerPool = 64
|
||||
}
|
Loading…
Reference in New Issue